summaryrefslogtreecommitdiffstats
path: root/src/peds/PlayerPed.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/peds/PlayerPed.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp
index 452dda4d..c82fe850 100644
--- a/src/peds/PlayerPed.cpp
+++ b/src/peds/PlayerPed.cpp
@@ -837,8 +837,8 @@ CPlayerPed::PlayerControlFighter(CPad *padUsed)
if (padMove > 0.0f) {
m_fRotationDest = CGeneral::GetRadianAngleBetweenPoints(0.0f, 0.0f, -leftRight, upDown) - TheCamera.Orientation;
- m_takeAStepAfterAttack = padMove > 2 * PAD_MOVE_TO_GAME_WORLD_MOVE;
- if (padUsed->GetSprint() && padMove > 1 * PAD_MOVE_TO_GAME_WORLD_MOVE)
+ m_takeAStepAfterAttack = padMove > (2 * PAD_MOVE_TO_GAME_WORLD_MOVE);
+ if (padUsed->GetSprint() && padMove > (1 * PAD_MOVE_TO_GAME_WORLD_MOVE))
bIsAttacking = false;
}
@@ -2081,13 +2081,13 @@ CPlayerPed::UpdateMeleeAttackers(void)
void
CPlayerPed::RemovePedFromMeleeList(CPed *ped)
{
- int i = 0;
- for (; m_pMeleeList[i] != ped; i++) {
- if (i >= ARRAY_SIZE(m_pMeleeList))
+ for (uint16 i = 0; i < ARRAY_SIZE(m_pMeleeList); i++) {
+ if (m_pMeleeList[i] == ped) {
+ m_pMeleeList[i] = nil;
+ ped->m_attackTimer = 0;
return;
+ }
}
- m_pMeleeList[i] = nil;
- ped->m_attackTimer = 0;
}
void