diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-06-03 01:24:08 +0300 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-06-03 01:24:08 +0300 |
commit | 509ca11d76373671281f17c7f828a0187ed7b9e4 (patch) | |
tree | c3d072fd7933274fbfc9f85f6be4a09613b2e7be /src/control/GameLogic.cpp | |
parent | 2ca3c50463eff025b9783930d112dd0c257c040e (diff) | |
parent | 04a91761df7c90ed16b37407d65d8674033efd3f (diff) |
Merge remote-tracking branch 'origin/master' into miami
# Conflicts:
# src/control/GameLogic.cpp
# src/control/PathFind.cpp
# src/control/RoadBlocks.cpp
# src/control/Script.cpp
# src/control/Script.h
# src/core/Frontend.cpp
# src/core/Frontend.h
# src/core/MenuScreens.cpp
# src/core/TempColModels.cpp
# src/core/config.h
# src/core/re3.cpp
# src/modelinfo/SimpleModelInfo.cpp
# src/modelinfo/VehicleModelInfo.cpp
# src/modelinfo/VehicleModelInfo.h
# src/render/Skidmarks.h
# src/render/WaterLevel.cpp
# src/save/GenericGameStorage.h
# src/vehicles/Automobile.cpp
# src/vehicles/Automobile.h
# src/vehicles/DamageManager.cpp
# src/vehicles/Vehicle.cpp
# src/vehicles/Vehicle.h
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; |