summaryrefslogtreecommitdiffstats
path: root/src/peds/PedFight.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-11-25 18:39:57 +0100
committerSergeanur <s.anureev@yandex.ua>2020-11-25 18:39:57 +0100
commit164f16c85b73176a6f2baf1e70e8ee8c575eb835 (patch)
tree586abc75cbc07f0cafe22e0b5d63fd18d2fd61e3 /src/peds/PedFight.cpp
parentOriginal enum name (diff)
downloadre3-164f16c85b73176a6f2baf1e70e8ee8c575eb835.tar
re3-164f16c85b73176a6f2baf1e70e8ee8c575eb835.tar.gz
re3-164f16c85b73176a6f2baf1e70e8ee8c575eb835.tar.bz2
re3-164f16c85b73176a6f2baf1e70e8ee8c575eb835.tar.lz
re3-164f16c85b73176a6f2baf1e70e8ee8c575eb835.tar.xz
re3-164f16c85b73176a6f2baf1e70e8ee8c575eb835.tar.zst
re3-164f16c85b73176a6f2baf1e70e8ee8c575eb835.zip
Diffstat (limited to 'src/peds/PedFight.cpp')
-rw-r--r--src/peds/PedFight.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/peds/PedFight.cpp b/src/peds/PedFight.cpp
index 43ef9b3d..4d4850e7 100644
--- a/src/peds/PedFight.cpp
+++ b/src/peds/PedFight.cpp
@@ -24,6 +24,7 @@
#include "World.h"
#include "Bike.h"
#include "Glass.h"
+#include "SpecialFX.h"
//--MIAMI: file done except TODOs
@@ -952,7 +953,18 @@ CPed::Attack(void)
}
}
- // TODO(Miami): CSpecialFX::AddWeaponStreak
+ if (IsPlayer()) {
+ eWeaponType weaponType = GetWeapon()->m_eWeaponType;
+ if (weaponType == WEAPONTYPE_BASEBALLBAT || weaponType == WEAPONTYPE_GOLFCLUB || weaponType == WEAPONTYPE_KATANA) {
+ float loopEndWithDelay = animLoopEnd;
+ if (loopEndWithDelay >= 98.0f)
+ loopEndWithDelay = (14.0f / 30.0f) + delayBetweenAnimAndFire;
+ if (weaponAnimAssoc->flags & ASSOC_RUNNING) {
+ if (weaponAnimAssoc->currentTime >= animLoopStart && weaponAnimAssoc->currentTime <= loopEndWithDelay)
+ CSpecialFX::AddWeaponStreak(weaponType);
+ }
+ }
+ }
// Anim breakout on running
if (IsPlayer()) {
@@ -1447,9 +1459,7 @@ CPed::Fight(void)
if (tFightMoves[m_curFightMove].startFireTime - streakDelay < currentAssoc->currentTime &&
streakDelay + tFightMoves[m_curFightMove].endFireTime > currentAssoc->currentTime) {
-
- // TODO(Miami): AddWeaponStreak
- // CSpecialFX::AddWeaponStreak(v2->m_weapons[(char)v2->m_currentWeapon].nWeaponId);
+ CSpecialFX::AddWeaponStreak(GetWeapon()->m_eWeaponType);
}
}
}