From 51d9c2c7809ff555bad7601cd37d0fcd9248f44c Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Mon, 21 Nov 2011 14:16:20 +0100 Subject: [PATCH] fixed argument type in ai related script instructions --- apps/openmw/mwscript/aiextensions.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/openmw/mwscript/aiextensions.cpp b/apps/openmw/mwscript/aiextensions.cpp index 6d74ae45a..aa541e55d 100644 --- a/apps/openmw/mwscript/aiextensions.cpp +++ b/apps/openmw/mwscript/aiextensions.cpp @@ -25,13 +25,13 @@ namespace MWScript { MWWorld::Ptr ptr = R()(runtime); - Interpreter::Type_Float x = runtime[0].mInteger; + Interpreter::Type_Float x = runtime[0].mFloat; runtime.pop(); - Interpreter::Type_Float y = runtime[0].mInteger; + Interpreter::Type_Float y = runtime[0].mFloat; runtime.pop(); - Interpreter::Type_Float z = runtime[0].mInteger; + Interpreter::Type_Float z = runtime[0].mFloat; runtime.pop(); // discard additional arguments (reset), because we have no idea what they mean. @@ -53,16 +53,16 @@ namespace MWScript std::string actor = runtime.getStringLiteral (runtime[0].mInteger); runtime.pop(); - Interpreter::Type_Float duration = runtime[0].mInteger; + Interpreter::Type_Float duration = runtime[0].mFloat; runtime.pop(); - Interpreter::Type_Float x = runtime[0].mInteger; + Interpreter::Type_Float x = runtime[0].mFloat; runtime.pop(); - Interpreter::Type_Float y = runtime[0].mInteger; + Interpreter::Type_Float y = runtime[0].mFloat; runtime.pop(); - Interpreter::Type_Float z = runtime[0].mInteger; + Interpreter::Type_Float z = runtime[0].mFloat; runtime.pop(); // discard additional arguments (reset), because we have no idea what they mean. @@ -99,9 +99,9 @@ namespace MWScript void registerExtensions (Compiler::Extensions& extensions) { - extensions.registerInstruction ("aitravel", "lll/l", opcodeAiTravel, + extensions.registerInstruction ("aitravel", "fff/l", opcodeAiTravel, opcodeAiTravelExplicit); - extensions.registerInstruction ("aiescort", "cllll/l", opcodeAiEscort, + extensions.registerInstruction ("aiescort", "cffff/l", opcodeAiEscort, opcodeAiEscortExplicit); extensions.registerFunction ("getaipackagedone", 'l', "", opcodeGetAiPackageDone,