From d7c7bb850b27d53ccd52ef47868d9fbd63f8474e Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 12 Mar 2016 20:32:42 +0100 Subject: [PATCH] ToggleAI cleanup --- apps/openmw/mwscript/aiextensions.cpp | 4 +--- apps/openmw/mwscript/docs/vmformat.txt | 2 +- components/compiler/extensions0.cpp | 4 ++-- components/compiler/opcodes.hpp | 1 - 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/openmw/mwscript/aiextensions.cpp b/apps/openmw/mwscript/aiextensions.cpp index db60d14d1..12e323272 100644 --- a/apps/openmw/mwscript/aiextensions.cpp +++ b/apps/openmw/mwscript/aiextensions.cpp @@ -465,7 +465,6 @@ namespace MWScript } }; - template class OpToggleAI : public Interpreter::Opcode0 { public: @@ -520,8 +519,7 @@ namespace MWScript interpreter.installSegment5 (Compiler::Ai::opcodeStartCombatExplicit, new OpStartCombat); interpreter.installSegment5 (Compiler::Ai::opcodeStopCombat, new OpStopCombat); interpreter.installSegment5 (Compiler::Ai::opcodeStopCombatExplicit, new OpStopCombat); - interpreter.installSegment5 (Compiler::Ai::opcodeToggleAI, new OpToggleAI); - interpreter.installSegment5 (Compiler::Ai::opcodeToggleAIExplicit, new OpToggleAI); + interpreter.installSegment5 (Compiler::Ai::opcodeToggleAI, new OpToggleAI); interpreter.installSegment5 (Compiler::Ai::opcodeSetHello, new OpSetAiSetting(0)); interpreter.installSegment5 (Compiler::Ai::opcodeSetHelloExplicit, new OpSetAiSetting(0)); diff --git a/apps/openmw/mwscript/docs/vmformat.txt b/apps/openmw/mwscript/docs/vmformat.txt index d3070c79b..e19d7a1ad 100644 --- a/apps/openmw/mwscript/docs/vmformat.txt +++ b/apps/openmw/mwscript/docs/vmformat.txt @@ -364,7 +364,7 @@ op 0x2000221: EnableLevitation op 0x2000222: GetLineOfSight op 0x2000223: GetLineOfSightExplicit op 0x2000224: ToggleAI -op 0x2000225: ToggleAIExplicit +op 0x2000225: unused op 0x2000226: COE op 0x2000227: Cast op 0x2000228: Cast, explicit diff --git a/components/compiler/extensions0.cpp b/components/compiler/extensions0.cpp index 161d8adb4..f67e70522 100644 --- a/components/compiler/extensions0.cpp +++ b/components/compiler/extensions0.cpp @@ -59,8 +59,8 @@ namespace Compiler extensions.registerInstruction ("modfight", "l", opcodeModFight, opcodeModFightExplicit); extensions.registerInstruction ("modflee", "l", opcodeModFlee, opcodeModFleeExplicit); extensions.registerInstruction ("modalarm", "l", opcodeModAlarm, opcodeModAlarmExplicit); - extensions.registerInstruction ("toggleai", "", opcodeToggleAI, opcodeToggleAI); - extensions.registerInstruction ("tai", "", opcodeToggleAI, opcodeToggleAI); + extensions.registerInstruction ("toggleai", "", opcodeToggleAI); + extensions.registerInstruction ("tai", "", opcodeToggleAI); extensions.registerInstruction("startcombat", "c", opcodeStartCombat, opcodeStartCombatExplicit); extensions.registerInstruction("stopcombat", "x", opcodeStopCombat, opcodeStopCombatExplicit); extensions.registerFunction ("gethello", 'l', "", opcodeGetHello, opcodeGetHelloExplicit); diff --git a/components/compiler/opcodes.hpp b/components/compiler/opcodes.hpp index 430b88484..773ac68f1 100644 --- a/components/compiler/opcodes.hpp +++ b/components/compiler/opcodes.hpp @@ -52,7 +52,6 @@ namespace Compiler const int opcodeGetLineOfSight = 0x2000222; const int opcodeGetLineOfSightExplicit = 0x2000223; const int opcodeToggleAI = 0x2000224; - const int opcodeToggleAIExplicit = 0x2000225; const int opcodeGetTarget = 0x2000238; const int opcodeGetTargetExplicit = 0x2000239; const int opcodeStartCombat = 0x200023a;