diff options
author | aap <aap@papnet.eu> | 2020-06-03 08:26:33 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-06-03 08:26:33 +0200 |
commit | ad03d9543b4710eabcbbd83aada7848151fd6846 (patch) | |
tree | 8e862f33d6870757ff14ad0c79ad09e14c24a590 /src/control/GameLogic.cpp | |
parent | forgot the fucking file (diff) | |
parent | Merge remote-tracking branch 'origin/master' into miami (diff) | |
download | re3-ad03d9543b4710eabcbbd83aada7848151fd6846.tar re3-ad03d9543b4710eabcbbd83aada7848151fd6846.tar.gz re3-ad03d9543b4710eabcbbd83aada7848151fd6846.tar.bz2 re3-ad03d9543b4710eabcbbd83aada7848151fd6846.tar.lz re3-ad03d9543b4710eabcbbd83aada7848151fd6846.tar.xz re3-ad03d9543b4710eabcbbd83aada7848151fd6846.tar.zst re3-ad03d9543b4710eabcbbd83aada7848151fd6846.zip |
Diffstat (limited to 'src/control/GameLogic.cpp')
-rw-r--r-- | src/control/GameLogic.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/control/GameLogic.cpp b/src/control/GameLogic.cpp index 6cfaa042..a98315e2 100644 --- a/src/control/GameLogic.cpp +++ b/src/control/GameLogic.cpp @@ -117,12 +117,20 @@ CGameLogic::Update() } break; case WBSTATE_WASTED: +#ifdef MISSION_REPLAY + if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > AddExtraDeathDelay() + 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= AddExtraDeathDelay() + 0x800)) { +#else if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= 0x800)) { +#endif TheCamera.SetFadeColour(200, 200, 200); TheCamera.Fade(2.0f, FADE_OUT); } +#ifdef MISSION_REPLAY + if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= AddExtraDeathDelay() + 0x1000) { +#else if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= 0x1000) { +#endif pPlayerInfo.m_WBState = WBSTATE_PLAYING; if (pPlayerInfo.m_bGetOutOfHospitalFree) { pPlayerInfo.m_bGetOutOfHospitalFree = false; @@ -168,11 +176,16 @@ CGameLogic::Update() } break; case WBSTATE_BUSTED: +#ifdef MISSION_REPLAY + if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > AddExtraDeathDelay() + 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= AddExtraDeathDelay() + 0x800)) { +#else if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= 0x800)) { +#endif TheCamera.SetFadeColour(0, 0, 0); TheCamera.Fade(2.0f, FADE_OUT); } + if (!CTheScripts::IsPlayerOnAMission() && pPlayerInfo.m_nBustedAudioStatus == 0) { if (CGeneral::GetRandomNumberInRange(0, 4) == 0) pPlayerInfo.m_nBustedAudioStatus = BUSTEDAUDIO_DONE; @@ -191,8 +204,12 @@ CGameLogic::Update() DMAudio.PlayLoadedMissionAudio(); // TODO: argument is 0 pPlayerInfo.m_nBustedAudioStatus = BUSTEDAUDIO_DONE; } - + +#ifdef MISSION_REPLAY + if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= AddExtraDeathDelay() + 0x1000) { +#else if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= 0x1000) { +#endif #ifdef FIX_BUGS pPlayerInfo.m_nBustedAudioStatus = BUSTEDAUDIO_NONE; #endif @@ -266,11 +283,19 @@ CGameLogic::Update() } break; case WBSTATE_FAILED_CRITICAL_MISSION: - if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > 0x800 && CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= 0x800) { +#ifdef MISSION_REPLAY + if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > AddExtraDeathDelay() + 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= AddExtraDeathDelay() + 0x800)) { +#else + if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= 0x800)) { +#endif TheCamera.SetFadeColour(0, 0, 0); TheCamera.Fade(2.0f, FADE_OUT); } +#ifdef MISSION_REPLAY + if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= AddExtraDeathDelay() + 0x1000) { +#else if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= 0x1000) { +#endif pPlayerInfo.m_WBState = WBSTATE_PLAYING; if (pPlayerInfo.m_pPed->bInVehicle) { CVehicle *pVehicle = pPlayerInfo.m_pPed->m_pMyVehicle; |