diff options
Diffstat (limited to 'src/control/Script5.cpp')
-rw-r--r-- | src/control/Script5.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp index 25b29256..e9f0967e 100644 --- a/src/control/Script5.cpp +++ b/src/control/Script5.cpp @@ -12,6 +12,7 @@ #include "Pools.h" #include "Population.h" #include "RpAnimBlend.h" +#include "SaveBuf.h" #include "Shadows.h" #include "SpecialFX.h" #include "World.h" @@ -1379,10 +1380,12 @@ void CRunningScript::DoDeatharrestCheck() if (!pPlayer->IsRestartingAfterDeath() && !pPlayer->IsRestartingAfterArrest()) return; #ifdef MISSION_REPLAY - if (AllowMissionReplay != 0) + if (AllowMissionReplay != MISSION_RETRY_STAGE_WAIT_FOR_TIMER_AFTER_RESTART && AllowMissionReplay != MISSION_RETRY_STAGE_NORMAL) return; + if (AllowMissionReplay == MISSION_RETRY_STAGE_WAIT_FOR_TIMER_AFTER_RESTART) + AllowMissionReplay = MISSION_RETRY_STAGE_NORMAL; if (CanAllowMissionReplay()) - AllowMissionReplay = 1; + AllowMissionReplay = MISSION_RETRY_STAGE_WAIT_FOR_SCRIPT_TO_TERMINATE; #endif script_assert(m_nStackPointer > 0); while (m_nStackPointer > 1) @@ -1913,7 +1916,7 @@ bool CRunningScript::CheckDamagedWeaponType(int32 actual, int32 type) if (type == WEAPONTYPE_ANYMELEE) { if (actual <= WEAPONTYPE_CHAINSAW) return true; - if (actual - WEAPONTYPE_GRENADE <= WEAPONTYPE_MINIGUN) + if (actual >= WEAPONTYPE_GRENADE && actual <= WEAPONTYPE_UNIDENTIFIED) return false; return false; } |