|
|
|
@ -121,6 +121,34 @@ namespace MWScript
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template <class R>
|
|
|
|
|
class OpGetForceJump : public Interpreter::Opcode0
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
virtual void execute (Interpreter::Runtime& runtime)
|
|
|
|
|
{
|
|
|
|
|
MWWorld::Ptr ptr = R()(runtime);
|
|
|
|
|
|
|
|
|
|
MWMechanics::CreatureStats& stats = ptr.getClass().getCreatureStats (ptr);
|
|
|
|
|
runtime.push (stats.getMovementFlag (MWMechanics::CreatureStats::Flag_ForceJump));
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template <class R>
|
|
|
|
|
class OpGetForceMoveJump : public Interpreter::Opcode0
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
virtual void execute (Interpreter::Runtime& runtime)
|
|
|
|
|
{
|
|
|
|
|
MWWorld::Ptr ptr = R()(runtime);
|
|
|
|
|
|
|
|
|
|
MWMechanics::CreatureStats& stats = ptr.getClass().getCreatureStats (ptr);
|
|
|
|
|
runtime.push (stats.getMovementFlag (MWMechanics::CreatureStats::Flag_ForceMoveJump));
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template <class R>
|
|
|
|
|
class OpGetForceSneak : public Interpreter::Opcode0
|
|
|
|
|
{
|
|
|
|
@ -169,27 +197,54 @@ namespace MWScript
|
|
|
|
|
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeToggleCollision, new OpToggleCollision);
|
|
|
|
|
|
|
|
|
|
//Force Run
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeClearForceRun,
|
|
|
|
|
new OpClearMovementFlag<ImplicitRef> (MWMechanics::CreatureStats::Flag_ForceRun));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeForceRun,
|
|
|
|
|
new OpSetMovementFlag<ImplicitRef> (MWMechanics::CreatureStats::Flag_ForceRun));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeClearForceSneak,
|
|
|
|
|
new OpClearMovementFlag<ImplicitRef> (MWMechanics::CreatureStats::Flag_ForceSneak));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeForceSneak,
|
|
|
|
|
new OpSetMovementFlag<ImplicitRef> (MWMechanics::CreatureStats::Flag_ForceSneak));
|
|
|
|
|
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeClearForceRunExplicit,
|
|
|
|
|
new OpClearMovementFlag<ExplicitRef> (MWMechanics::CreatureStats::Flag_ForceRun));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeForceRun,
|
|
|
|
|
new OpSetMovementFlag<ImplicitRef> (MWMechanics::CreatureStats::Flag_ForceRun));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeForceRunExplicit,
|
|
|
|
|
new OpSetMovementFlag<ExplicitRef> (MWMechanics::CreatureStats::Flag_ForceRun));
|
|
|
|
|
|
|
|
|
|
//Force Jump
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeClearForceJump,
|
|
|
|
|
new OpClearMovementFlag<ImplicitRef> (MWMechanics::CreatureStats::Flag_ForceJump));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeClearForceJumpExplicit,
|
|
|
|
|
new OpClearMovementFlag<ExplicitRef> (MWMechanics::CreatureStats::Flag_ForceJump));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeForceJump,
|
|
|
|
|
new OpSetMovementFlag<ImplicitRef> (MWMechanics::CreatureStats::Flag_ForceJump));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeForceJumpExplicit,
|
|
|
|
|
new OpSetMovementFlag<ExplicitRef> (MWMechanics::CreatureStats::Flag_ForceJump));
|
|
|
|
|
|
|
|
|
|
//Force MoveJump
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeClearForceMoveJump,
|
|
|
|
|
new OpClearMovementFlag<ImplicitRef> (MWMechanics::CreatureStats::Flag_ForceMoveJump));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeClearForceMoveJumpExplicit,
|
|
|
|
|
new OpClearMovementFlag<ExplicitRef> (MWMechanics::CreatureStats::Flag_ForceMoveJump));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeForceMoveJump,
|
|
|
|
|
new OpSetMovementFlag<ImplicitRef> (MWMechanics::CreatureStats::Flag_ForceMoveJump));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeForceMoveJumpExplicit,
|
|
|
|
|
new OpSetMovementFlag<ExplicitRef> (MWMechanics::CreatureStats::Flag_ForceMoveJump));
|
|
|
|
|
|
|
|
|
|
//Force Sneak
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeClearForceSneak,
|
|
|
|
|
new OpClearMovementFlag<ImplicitRef> (MWMechanics::CreatureStats::Flag_ForceSneak));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeClearForceSneakExplicit,
|
|
|
|
|
new OpClearMovementFlag<ExplicitRef> (MWMechanics::CreatureStats::Flag_ForceSneak));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeForceSneak,
|
|
|
|
|
new OpSetMovementFlag<ImplicitRef> (MWMechanics::CreatureStats::Flag_ForceSneak));
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeForceSneakExplicit,
|
|
|
|
|
new OpSetMovementFlag<ExplicitRef> (MWMechanics::CreatureStats::Flag_ForceSneak));
|
|
|
|
|
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeGetPcRunning, new OpGetPcRunning);
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeGetPcSneaking, new OpGetPcSneaking);
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeGetForceRun, new OpGetForceRun<ImplicitRef>);
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeGetForceRunExplicit, new OpGetForceRun<ExplicitRef>);
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeGetForceJump, new OpGetForceJump<ImplicitRef>);
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeGetForceJumpExplicit, new OpGetForceJump<ExplicitRef>);
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeGetForceMoveJump, new OpGetForceMoveJump<ImplicitRef>);
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeGetForceMoveJumpExplicit, new OpGetForceMoveJump<ExplicitRef>);
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeGetForceSneak, new OpGetForceSneak<ImplicitRef>);
|
|
|
|
|
interpreter.installSegment5 (Compiler::Control::opcodeGetForceSneakExplicit, new OpGetForceSneak<ExplicitRef>);
|
|
|
|
|
}
|
|
|
|
|