summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2019-08-16 20:17:15 +0200
committerFilip Gawin <filip.gawin@zoho.com>2019-08-27 21:18:47 +0200
commit2fabbc3b4cab40220986f402569af64673cb4cd9 (patch)
tree3278631a5e3dd19a0af92204e6bfb48702dd04f0 /src/peds
parentCleanup (diff)
downloadre3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.gz
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.bz2
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.lz
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.xz
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.tar.zst
re3-2fabbc3b4cab40220986f402569af64673cb4cd9.zip
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/Ped.cpp16
-rw-r--r--src/peds/Ped.h2
-rw-r--r--src/peds/PedPlacement.cpp2
3 files changed, 10 insertions, 10 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 209c4ff6..65bd696d 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -1792,7 +1792,7 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
neededPos.z = autoZPos.z;
m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f);
} else if (neededPos.z <= currentZ && m_pVehicleAnim && vehAnim != ANIM_VAN_CLOSE_L && vehAnim != ANIM_VAN_CLOSE) {
- adjustedTimeStep = min(m_pVehicleAnim->timeStep, 0.1f);
+ adjustedTimeStep = Min(m_pVehicleAnim->timeStep, 0.1f);
// Smoothly change ped position
neededPos.z = currentZ - (currentZ - neededPos.z) / (m_pVehicleAnim->GetTimeLeft() / adjustedTimeStep);
@@ -1807,12 +1807,12 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
if (m_pVehicleAnim &&
(vehAnim == ANIM_CAR_GETIN_RHS || vehAnim == ANIM_CAR_GETIN_LOW_RHS || vehAnim == ANIM_CAR_GETIN_LHS || vehAnim == ANIM_CAR_GETIN_LOW_LHS
|| vehAnim == ANIM_CAR_QJACK || vehAnim == ANIM_VAN_GETIN_L || vehAnim == ANIM_VAN_GETIN)) {
- adjustedTimeStep = min(m_pVehicleAnim->timeStep, 0.1f);
+ adjustedTimeStep = Min(m_pVehicleAnim->timeStep, 0.1f);
// Smoothly change ped position
neededPos.z = (neededPos.z - currentZ) / (m_pVehicleAnim->GetTimeLeft() / adjustedTimeStep) + currentZ;
} else if (m_nPedState == PED_ENTER_CAR || m_nPedState == PED_CARJACK) {
- neededPos.z = max(currentZ, autoZPos.z);
+ neededPos.z = Max(currentZ, autoZPos.z);
}
}
}
@@ -4622,7 +4622,7 @@ CPed::LoadFightData(void)
// Actually GetLocalDirectionTo(Turn/Look)
int
-CPed::GetLocalDirection(CVector2D const &posOffset)
+CPed::GetLocalDirection(const CVector2D &posOffset)
{
float direction;
@@ -4771,12 +4771,12 @@ CPed::FightStrike(CVector &touchedNodePos)
float moveMult;
if (m_lastFightMove == FIGHTMOVE_GROUNDKICK) {
- moveMult = min(damageMult * 0.6f, 4.0f);
+ moveMult = Min(damageMult * 0.6f, 4.0f);
} else {
if (nearPed->m_nPedState != PED_DIE || damageMult >= 20) {
moveMult = damageMult;
} else {
- moveMult = min(damageMult * 2.0f, 14.0f);
+ moveMult = Min(damageMult * 2.0f, 14.0f);
}
}
@@ -5434,7 +5434,7 @@ CPed::CreateDeadPedWeaponPickups(void)
pickupPos.z = CWorld::FindGroundZFor3DCoord(pickupPos.x, pickupPos.y, pickupPos.z, &found) + 0.5f;
}
if (found)
- CPickups::GenerateNewOne_WeaponType(pickupPos, weapon, PICKUP_ONCE_TIMEOUT, min(weaponAmmo, AmmoForWeapon_OnStreet[weapon]));
+ CPickups::GenerateNewOne_WeaponType(pickupPos, weapon, PICKUP_ONCE_TIMEOUT, Min(weaponAmmo, AmmoForWeapon_OnStreet[weapon]));
}
ClearWeapons();
}
@@ -5443,7 +5443,7 @@ void
CPed::SetAttackTimer(uint32 time)
{
if (CTimer::GetTimeInMilliseconds() > m_attackTimer)
- m_attackTimer = max(m_lastHitTime, CTimer::GetTimeInMilliseconds()) + time;
+ m_attackTimer = Max(m_lastHitTime, CTimer::GetTimeInMilliseconds()) + time;
}
void
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index ff581150..c1e93fdc 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -575,7 +575,7 @@ public:
void StartFightAttack(uint8);
void SetWaitState(eWaitState, void*);
bool FightStrike(CVector&);
- int GetLocalDirection(CVector2D const &);
+ int GetLocalDirection(const CVector2D &);
void StartFightDefend(uint8, uint8, uint8);
void PlayHitSound(CPed*);
void SetFall(int, AnimationId, uint8);
diff --git a/src/peds/PedPlacement.cpp b/src/peds/PedPlacement.cpp
index 8a40e56f..d7b7ec75 100644
--- a/src/peds/PedPlacement.cpp
+++ b/src/peds/PedPlacement.cpp
@@ -29,7 +29,7 @@ CPedPlacement::FindZCoorForPed(CVector* pos)
if (CWorld::ProcessVerticalLine(vec, startZ, foundCol, foundEnt, true, false, false, false, true, false, nil))
foundColZ2 = foundCol.point.z;
- zForPed = max(foundColZ, foundColZ2);
+ zForPed = Max(foundColZ, foundColZ2);
if (zForPed > -99.0f)
pos->z = 1.04f + zForPed;