summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-10-05 21:18:51 +0200
committereray orçunus <erayorcunus@gmail.com>2020-10-05 21:18:51 +0200
commit556dbdcdd6c1f1d8181cde221b3481698ea689cc (patch)
tree46af267a8db9d27b3544e9ce8959c0da08f2afa4 /src/control
parentMerge branch 'master' of https://github.com/GTAmodding/re3 (diff)
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadre3-556dbdcdd6c1f1d8181cde221b3481698ea689cc.tar
re3-556dbdcdd6c1f1d8181cde221b3481698ea689cc.tar.gz
re3-556dbdcdd6c1f1d8181cde221b3481698ea689cc.tar.bz2
re3-556dbdcdd6c1f1d8181cde221b3481698ea689cc.tar.lz
re3-556dbdcdd6c1f1d8181cde221b3481698ea689cc.tar.xz
re3-556dbdcdd6c1f1d8181cde221b3481698ea689cc.tar.zst
re3-556dbdcdd6c1f1d8181cde221b3481698ea689cc.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Darkel.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/control/Darkel.cpp b/src/control/Darkel.cpp
index 02627f33..793bec36 100644
--- a/src/control/Darkel.cpp
+++ b/src/control/Darkel.cpp
@@ -13,6 +13,9 @@
#include "Font.h"
#include "Text.h"
#include "Vehicle.h"
+#ifdef FIX_BUGS
+#include "Replay.h"
+#endif
#define FRENZY_ANY_PED -1
#define FRENZY_ANY_CAR -2
@@ -60,6 +63,10 @@ CDarkel::CalcFade(uint32 time, uint32 start, uint32 end)
void
CDarkel::DrawMessages()
{
+#ifdef FIX_BUGS
+ if (CReplay::IsPlayingBack())
+ return;
+#endif
switch (Status) {
case KILLFRENZY_ONGOING:
{
@@ -171,6 +178,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) {
@@ -185,6 +196,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
@@ -210,6 +225,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++;
}
@@ -301,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;