summaryrefslogtreecommitdiffstats
path: root/src/control/GameLogic.cpp
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2020-06-29 08:37:53 +0200
committerGitHub <noreply@github.com>2020-06-29 08:37:53 +0200
commit860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb (patch)
tree6a8f83b0d46e97b198f095b7624deecca75051e7 /src/control/GameLogic.cpp
parentrestore Text.cpp (diff)
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadre3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar
re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.gz
re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.bz2
re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.lz
re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.xz
re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.zst
re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.zip
Diffstat (limited to 'src/control/GameLogic.cpp')
-rw-r--r--src/control/GameLogic.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/control/GameLogic.cpp b/src/control/GameLogic.cpp
index 9c3c4982..04983e30 100644
--- a/src/control/GameLogic.cpp
+++ b/src/control/GameLogic.cpp
@@ -83,12 +83,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;
@@ -131,11 +139,19 @@ 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);
}
+#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;
int takeMoney;
@@ -203,11 +219,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;