diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-10-11 00:18:08 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-10-11 00:18:08 +0200 |
commit | f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98 (patch) | |
tree | be72177b9fd7d8837042b4397a79ffc83fb89bdd /src/control/Darkel.cpp | |
parent | bug fix (diff) | |
parent | Merge pull request #745 from Tatsh/vscode (diff) | |
download | re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.tar re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.tar.gz re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.tar.bz2 re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.tar.lz re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.tar.xz re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.tar.zst re3-f1bb09826d0d1e6a1f5ac92ad97c25ecf2843f98.zip |
Diffstat (limited to 'src/control/Darkel.cpp')
-rw-r--r-- | src/control/Darkel.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/control/Darkel.cpp b/src/control/Darkel.cpp index 75d27e26..1191e8ad 100644 --- a/src/control/Darkel.cpp +++ b/src/control/Darkel.cpp @@ -14,6 +14,9 @@ #include "Text.h" #include "Vehicle.h" #include "GameLogic.h" +#ifdef FIX_BUGS +#include "Replay.h" +#endif #define FRENZY_ANY_PED -1 #define FRENZY_ANY_CAR -2 @@ -62,6 +65,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: { @@ -167,6 +174,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) { @@ -181,6 +192,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 @@ -206,6 +221,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++; } @@ -299,6 +318,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; |