summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-01-24 18:05:43 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-01-24 18:12:36 +0100
commit071e503856cb9736847d68dd29007b4e8524b35a (patch)
treeed812ba945d160c8dbd68deac1794b14de32203c /src/peds
parentFix out of bound binding orders (diff)
downloadre3-071e503856cb9736847d68dd29007b4e8524b35a.tar
re3-071e503856cb9736847d68dd29007b4e8524b35a.tar.gz
re3-071e503856cb9736847d68dd29007b4e8524b35a.tar.bz2
re3-071e503856cb9736847d68dd29007b4e8524b35a.tar.lz
re3-071e503856cb9736847d68dd29007b4e8524b35a.tar.xz
re3-071e503856cb9736847d68dd29007b4e8524b35a.tar.zst
re3-071e503856cb9736847d68dd29007b4e8524b35a.zip
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/PedAI.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/peds/PedAI.cpp b/src/peds/PedAI.cpp
index a0769b9c..3a145c7a 100644
--- a/src/peds/PedAI.cpp
+++ b/src/peds/PedAI.cpp
@@ -3297,6 +3297,7 @@ void
CPed::LineUpPedWithCar(PedLineUpPhase phase)
{
bool vehIsUpsideDown = false;
+ bool stillGettingInOut = false;
int vehAnim;
float seatPosMult = 0.0f;
float currentZ;
@@ -3549,8 +3550,8 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
if (m_pVehicleAnim && vehAnim != ANIM_VAN_GETIN_L && vehAnim != ANIM_VAN_CLOSE_L && vehAnim != ANIM_VAN_CLOSE && vehAnim != ANIM_VAN_GETIN) {
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);
+ } else if (neededPos.z < currentZ && m_pVehicleAnim && vehAnim != ANIM_VAN_CLOSE_L && vehAnim != ANIM_VAN_CLOSE) {
+ adjustedTimeStep = Max(m_pVehicleAnim->timeStep, 0.1f);
// Smoothly change ped position
neededPos.z = currentZ - (currentZ - neededPos.z) / (m_pVehicleAnim->GetTimeLeft() / adjustedTimeStep);
@@ -3568,7 +3569,7 @@ 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 = Max(m_pVehicleAnim->timeStep, 0.1f);
// Smoothly change ped position
neededPos.z = (neededPos.z - currentZ) / (m_pVehicleAnim->GetTimeLeft() / adjustedTimeStep) + currentZ;
@@ -3580,7 +3581,6 @@ CPed::LineUpPedWithCar(PedLineUpPhase phase)
}
}
- bool stillGettingInOut = false;
if (CTimer::GetTimeInMilliseconds() < m_nPedStateTimer)
stillGettingInOut = veh->m_vehType != VEHICLE_TYPE_BOAT || bOnBoat;