summaryrefslogtreecommitdiffstats
path: root/src/control/Darkel.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-10-11 11:58:11 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-10-11 11:58:11 +0200
commit552f308e9e0a745852ca11064b6b31e16b115917 (patch)
treea88d109962a7de5594f3781fe1e388879936218c /src/control/Darkel.cpp
parentControl updates (diff)
parentMerge pull request #760 from Sergeanur/VC/TextFinish (diff)
downloadre3-552f308e9e0a745852ca11064b6b31e16b115917.tar
re3-552f308e9e0a745852ca11064b6b31e16b115917.tar.gz
re3-552f308e9e0a745852ca11064b6b31e16b115917.tar.bz2
re3-552f308e9e0a745852ca11064b6b31e16b115917.tar.lz
re3-552f308e9e0a745852ca11064b6b31e16b115917.tar.xz
re3-552f308e9e0a745852ca11064b6b31e16b115917.tar.zst
re3-552f308e9e0a745852ca11064b6b31e16b115917.zip
Diffstat (limited to 'src/control/Darkel.cpp')
-rw-r--r--src/control/Darkel.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/control/Darkel.cpp b/src/control/Darkel.cpp
index ea9fe160..84da59da 100644
--- a/src/control/Darkel.cpp
+++ b/src/control/Darkel.cpp
@@ -15,6 +15,9 @@
#include "Text.h"
#include "Vehicle.h"
#include "GameLogic.h"
+#ifdef FIX_BUGS
+#include "Replay.h"
+#endif
//--MIAMI: file done except TODO
@@ -173,6 +176,10 @@ CDarkel::ReadStatus()
void
CDarkel::RegisterCarBlownUpByPlayer(CVehicle *vehicle)
{
+#ifdef FIX_BUGS
+ if (CReplay::IsPlayingBack())
+ return;
+#endif
if (FrenzyOnGoing()) {
int32 model = vehicle->GetModelIndex();
if (ModelToKill == FRENZY_ANY_CAR || ModelToKill == model || ModelToKill2 == model || ModelToKill3 == model || ModelToKill4 == model) {
@@ -200,6 +207,10 @@ CDarkel::RegisterCarBlownUpByPlayer(CVehicle *vehicle)
void
CDarkel::RegisterKillByPlayer(CPed *victim, eWeaponType weapon, bool headshot)
{
+#ifdef FIX_BUGS
+ if (CReplay::IsPlayingBack())
+ return;
+#endif
if (FrenzyOnGoing() && (weapon == WeaponType
|| weapon == WEAPONTYPE_EXPLOSION
|| weapon == WEAPONTYPE_UZI_DRIVEBY && WeaponType == WEAPONTYPE_UZI
@@ -225,6 +236,10 @@ CDarkel::RegisterKillByPlayer(CPed *victim, eWeaponType weapon, bool headshot)
void
CDarkel::RegisterKillNotByPlayer(CPed* victim, eWeaponType weapontype)
{
+#ifdef FIX_BUGS
+ if (CReplay::IsPlayingBack())
+ return;
+#endif
CStats::PeopleKilledByOthers++;
}
@@ -305,6 +320,11 @@ CDarkel::StartFrenzy(eWeaponType weaponType, int32 time, uint16 kill, int32 mode
void
CDarkel::Update()
{
+#ifdef FIX_BUGS
+ if (CReplay::IsPlayingBack())
+ return;
+#endif
+
if (Status != KILLFRENZY_ONGOING)
return;