diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-09 20:24:18 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-09 20:24:18 +0100 |
commit | f5b97f1e8a9dab149619d306e55bc8f2ef5f44a0 (patch) | |
tree | 41a57d4a2cd1276c12d66fdb0c4c4b653c0d9a67 /src/control/Script.cpp | |
parent | moved new renderer; implemented leeds building rendering (diff) | |
download | re3-f5b97f1e8a9dab149619d306e55bc8f2ef5f44a0.tar re3-f5b97f1e8a9dab149619d306e55bc8f2ef5f44a0.tar.gz re3-f5b97f1e8a9dab149619d306e55bc8f2ef5f44a0.tar.bz2 re3-f5b97f1e8a9dab149619d306e55bc8f2ef5f44a0.tar.lz re3-f5b97f1e8a9dab149619d306e55bc8f2ef5f44a0.tar.xz re3-f5b97f1e8a9dab149619d306e55bc8f2ef5f44a0.tar.zst re3-f5b97f1e8a9dab149619d306e55bc8f2ef5f44a0.zip |
Diffstat (limited to 'src/control/Script.cpp')
-rw-r--r-- | src/control/Script.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp index df851daa..543221c6 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -2179,7 +2179,7 @@ bool CUpsideDownCarCheck::IsCarUpsideDown(int32 id) // done(LCS) bool CUpsideDownCarCheck::IsCarUpsideDown(CVehicle* pVehicle) { - assert(pVehicle); + script_assert(pVehicle); return pVehicle->GetUp().z <= UPSIDEDOWN_UP_THRESHOLD && pVehicle->GetMoveSpeed().Magnitude() < UPSIDEDOWN_MOVE_SPEED_THRESHOLD && pVehicle->GetTurnSpeed().Magnitude() < UPSIDEDOWN_TURN_SPEED_THRESHOLD; @@ -2411,7 +2411,7 @@ int32* GetPointerToScriptVariableForDebug(CRunningScript* pScript, uint32* pIp, return &pScript->m_anLocalVariables[pScript->m_nLocalsPointer + (type - ARGUMENT_LOCAL)]; } else { - assert(type >= ARGUMENT_TIMER); + script_assert(type >= ARGUMENT_TIMER); sprintf(tmpstr, " TIMER%d@", (type - ARGUMENT_TIMER)); strcat(buf, tmpstr); return &pScript->m_anLocalVariables[NUM_LOCAL_VARS + 8 + (type - ARGUMENT_TIMER)]; // why 8? @@ -2534,7 +2534,7 @@ int32* GetPointerToScriptVariable(CRunningScript* pScript, uint32* pIp) return &pScript->m_anLocalVariables[pScript->m_nLocalsPointer + (type - ARGUMENT_LOCAL)]; } else { - assert(type >= ARGUMENT_TIMER); + script_assert(type >= ARGUMENT_TIMER); return &pScript->m_anLocalVariables[NUM_LOCAL_VARS + 8 + (type - ARGUMENT_TIMER)]; } } @@ -4998,7 +4998,10 @@ int8 CRunningScript::ProcessCommands200To299(int32 command) return 0; } //case COMMAND_ADD_AMMO_TO_CAR: - //case COMMAND_IS_PLAYER_STILL_ALIVE: + case COMMAND_IS_PLAYER_STILL_ALIVE: + CollectParameters(&m_nIp, 1); + UpdateCompareFlag(CWorld::Players[ScriptParams[0]].m_WBState != WBSTATE_WASTED); + return 0; case COMMAND_IS_PLAYER_DEAD: CollectParameters(&m_nIp, 1); UpdateCompareFlag(CWorld::Players[ScriptParams[0]].m_WBState == WBSTATE_WASTED); |