mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Implement GetPcJumping instruction
This commit is contained in:
parent
45847c67ad
commit
b3764c504a
4 changed files with 17 additions and 1 deletions
|
@ -370,4 +370,5 @@ op 0x200022f: Resurrect
|
|||
op 0x2000230: Resurrect, explicit
|
||||
op 0x2000231: GetSpellReadied
|
||||
op 0x2000232: GetSpellReadied, explicit
|
||||
opcodes 0x2000233-0x3ffffff unused
|
||||
op 0x2000233: GetPcJumping
|
||||
opcodes 0x2000234-0x3ffffff unused
|
||||
|
|
|
@ -58,6 +58,18 @@ namespace MWScript
|
|||
}
|
||||
};
|
||||
|
||||
class OpGetPcJumping : public Interpreter::Opcode0
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void execute (Interpreter::Runtime& runtime)
|
||||
{
|
||||
MWBase::World* world = MWBase::Environment::get().getWorld();
|
||||
MWWorld::Ptr player = world->getPlayer().getPlayer();
|
||||
runtime.push (!world->isOnGround(player) && !world->isFlying(player));
|
||||
}
|
||||
};
|
||||
|
||||
class OpWakeUpPc : public Interpreter::Opcode0
|
||||
{
|
||||
public:
|
||||
|
@ -771,6 +783,7 @@ namespace MWScript
|
|||
interpreter.installSegment5 (Compiler::Misc::opcodeDontSaveObject, new OpDontSaveObject);
|
||||
interpreter.installSegment5 (Compiler::Misc::opcodeToggleVanityMode, new OpToggleVanityMode);
|
||||
interpreter.installSegment5 (Compiler::Misc::opcodeGetPcSleep, new OpGetPcSleep);
|
||||
interpreter.installSegment5 (Compiler::Misc::opcodeGetPcJumping, new OpGetPcJumping);
|
||||
interpreter.installSegment5 (Compiler::Misc::opcodeWakeUpPc, new OpWakeUpPc);
|
||||
interpreter.installSegment5 (Compiler::Misc::opcodePlayBink, new OpPlayBink);
|
||||
interpreter.installSegment5 (Compiler::Misc::opcodeGetLocked, new OpGetLocked<ImplicitRef>);
|
||||
|
|
|
@ -241,6 +241,7 @@ namespace Compiler
|
|||
extensions.registerInstruction ("togglevanitymode", "", opcodeToggleVanityMode);
|
||||
extensions.registerInstruction ("tvm", "", opcodeToggleVanityMode);
|
||||
extensions.registerFunction ("getpcsleep", 'l', "", opcodeGetPcSleep);
|
||||
extensions.registerFunction ("getpcjumping", 'l', "", opcodeGetPcJumping);
|
||||
extensions.registerInstruction ("wakeuppc", "", opcodeWakeUpPc);
|
||||
extensions.registerInstruction ("playbink", "Sl", opcodePlayBink);
|
||||
extensions.registerFunction ("getlocked", 'l', "", opcodeGetLocked, opcodeGetLockedExplicit);
|
||||
|
|
|
@ -188,6 +188,7 @@ namespace Compiler
|
|||
const int opcodeDontSaveObject = 0x2000153;
|
||||
const int opcodeToggleVanityMode = 0x2000174;
|
||||
const int opcodeGetPcSleep = 0x200019f;
|
||||
const int opcodeGetPcJumping = 0x2000233;
|
||||
const int opcodeWakeUpPc = 0x20001a2;
|
||||
const int opcodeGetLocked = 0x20001c7;
|
||||
const int opcodeGetLockedExplicit = 0x20001c8;
|
||||
|
|
Loading…
Reference in a new issue