|
|
|
@ -616,6 +616,18 @@ namespace MWScript
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template <bool Enable>
|
|
|
|
|
class OpEnableTeleporting : public Interpreter::Opcode0
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
virtual void execute (Interpreter::Runtime& runtime)
|
|
|
|
|
{
|
|
|
|
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
|
|
|
|
world->enableTeleporting(Enable);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const int opcodeXBox = 0x200000c;
|
|
|
|
|
const int opcodeOnActivate = 0x200000d;
|
|
|
|
|
const int opcodeActivate = 0x2000075;
|
|
|
|
@ -670,6 +682,9 @@ namespace MWScript
|
|
|
|
|
const int opcodeHitOnMe = 0x2000213;
|
|
|
|
|
const int opcodeHitOnMeExplicit = 0x2000214;
|
|
|
|
|
|
|
|
|
|
const int opcodeDisableTeleporting = 0x2000215;
|
|
|
|
|
const int opcodeEnableTeleporting = 0x2000216;
|
|
|
|
|
|
|
|
|
|
void registerExtensions (Compiler::Extensions& extensions)
|
|
|
|
|
{
|
|
|
|
|
extensions.registerFunction ("xbox", 'l', "", opcodeXBox);
|
|
|
|
@ -713,6 +728,8 @@ namespace MWScript
|
|
|
|
|
extensions.registerFunction ("getstandingactor", 'l', "", opcodeGetStandingActor, opcodeGetStandingActorExplicit);
|
|
|
|
|
extensions.registerFunction ("getwindspeed", 'f', "", opcodeGetWindSpeed);
|
|
|
|
|
extensions.registerFunction ("hitonme", 'l', "S", opcodeHitOnMe, opcodeHitOnMeExplicit);
|
|
|
|
|
extensions.registerInstruction ("disableteleporting", "", opcodeDisableTeleporting);
|
|
|
|
|
extensions.registerInstruction ("enableteleporting", "", opcodeEnableTeleporting);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void installOpcodes (Interpreter::Interpreter& interpreter)
|
|
|
|
@ -768,6 +785,8 @@ namespace MWScript
|
|
|
|
|
interpreter.installSegment5 (opcodeGetWindSpeed, new OpGetWindSpeed);
|
|
|
|
|
interpreter.installSegment5 (opcodeHitOnMe, new OpHitOnMe<ImplicitRef>);
|
|
|
|
|
interpreter.installSegment5 (opcodeHitOnMeExplicit, new OpHitOnMe<ExplicitRef>);
|
|
|
|
|
interpreter.installSegment5 (opcodeDisableTeleporting, new OpEnableTeleporting<false>);
|
|
|
|
|
interpreter.installSegment5 (opcodeEnableTeleporting, new OpEnableTeleporting<true>);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|