summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-10-18 19:35:19 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-10-18 19:35:19 +0200
commitbc42b3a78e59458c611dc77598f85412a258be03 (patch)
treeff319803e09581ebba100f08f267da0f4d6d6c89 /src/peds
parentMerge remote-tracking branch 'upstream/miami' into miami (diff)
parentMerge pull request #769 from Sergeanur/VC/Pickups (diff)
downloadre3-bc42b3a78e59458c611dc77598f85412a258be03.tar
re3-bc42b3a78e59458c611dc77598f85412a258be03.tar.gz
re3-bc42b3a78e59458c611dc77598f85412a258be03.tar.bz2
re3-bc42b3a78e59458c611dc77598f85412a258be03.tar.lz
re3-bc42b3a78e59458c611dc77598f85412a258be03.tar.xz
re3-bc42b3a78e59458c611dc77598f85412a258be03.tar.zst
re3-bc42b3a78e59458c611dc77598f85412a258be03.zip
Diffstat (limited to '')
-rw-r--r--src/peds/Ped.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index f9f658b4..82298e74 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -14,6 +14,7 @@
#include "AnimBlendClumpData.h"
#include "AnimBlendAssociation.h"
#include "Fire.h"
+#include "Glass.h"
#include "DMAudio.h"
#include "General.h"
#include "SurfaceTable.h"
@@ -5865,7 +5866,7 @@ CPed::FightStrike(CVector &touchedNodePos, bool fightWithWeapon)
if (m_fightState == FIGHTSTATE_JUST_ATTACKED)
return false;
- // TODO(Miami): BreakGlassPhysically
+ CGlass::BreakGlassPhysically(touchedNodePos, radius);
for (int i = 0; i < m_numNearPeds; i++) {
int8 pedFound = 0;
@@ -15403,7 +15404,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 +15414,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;
}