summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-10-18 18:31:02 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2020-10-18 18:31:02 +0200
commit937290db098755988e10003eb7ce0f3e1c337c99 (patch)
tree4832ed41552a51a5314fa30e843310eb8c0d5518 /src/peds
parentAttractor obj. fixes (diff)
downloadre3-937290db098755988e10003eb7ce0f3e1c337c99.tar
re3-937290db098755988e10003eb7ce0f3e1c337c99.tar.gz
re3-937290db098755988e10003eb7ce0f3e1c337c99.tar.bz2
re3-937290db098755988e10003eb7ce0f3e1c337c99.tar.lz
re3-937290db098755988e10003eb7ce0f3e1c337c99.tar.xz
re3-937290db098755988e10003eb7ce0f3e1c337c99.tar.zst
re3-937290db098755988e10003eb7ce0f3e1c337c99.zip
Diffstat (limited to 'src/peds')
-rw-r--r--src/peds/Ped.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 469cdf4c..5ec83d3b 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -15403,7 +15403,7 @@ CPed::ProcessObjective(void)
CVector distance = m_nextRoutePointPos - GetPosition();
distance.z = 0.0f;
if (m_objective == OBJECTIVE_GOTO_SHELTER_ON_FOOT) {
- if (m_nMoveState == PEDMOVE_RUN && distance.Magnitude() < SQR(2.0f)) {
+ if (m_nMoveState == PEDMOVE_RUN && distance.MagnitudeSqr() < SQR(2.0f)) {
SetMoveState(PEDMOVE_WALK);
bIsRunning = false;
}
@@ -15413,7 +15413,7 @@ CPed::ProcessObjective(void)
}
}
else if (m_objective == OBJECTIVE_GOTO_ICE_CREAM_VAN_ON_FOOT) {
- if (m_nMoveState == PEDMOVE_RUN && distance.Magnitude() < SQR(4.0f)) {
+ if (m_nMoveState == PEDMOVE_RUN && distance.MagnitudeSqr() < SQR(4.0f)) {
SetMoveState(PEDMOVE_WALK);
bIsRunning = false;
}