summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.h
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-01-23 21:21:50 +0100
committerGitHub <noreply@github.com>2020-01-23 21:21:50 +0100
commitd75b9b82571834248a2337473307ffece8a73023 (patch)
treed7465ee2e9019d83f127a2abbbf3a7d01884a029 /src/peds/Ped.h
parentFixing possible leaks in CModelInfo::ShutDown (diff)
downloadre3-d75b9b82571834248a2337473307ffece8a73023.tar
re3-d75b9b82571834248a2337473307ffece8a73023.tar.gz
re3-d75b9b82571834248a2337473307ffece8a73023.tar.bz2
re3-d75b9b82571834248a2337473307ffece8a73023.tar.lz
re3-d75b9b82571834248a2337473307ffece8a73023.tar.xz
re3-d75b9b82571834248a2337473307ffece8a73023.tar.zst
re3-d75b9b82571834248a2337473307ffece8a73023.zip
Diffstat (limited to '')
-rw-r--r--src/peds/Ped.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index f8a063f3..b421bc83 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -792,6 +792,24 @@ public:
void ReplaceWeaponWhenExitingVehicle(void);
void RemoveWeaponWhenEnteringVehicle(void);
bool IsNotInWreckedVehicle();
+ // My additions, because there were many, many instances of that.
+ inline void SetFindPathAndFlee(CEntity *fleeFrom, int time, bool walk = false)
+ {
+ SetFlee(fleeFrom, time);
+ bUsePedNodeSeek = true;
+ m_pNextPathNode = nil;
+ if (walk)
+ SetMoveState(PEDMOVE_WALK);
+ }
+
+ inline void SetFindPathAndFlee(CVector2D const &from, int time, bool walk = false)
+ {
+ SetFlee(from, time);
+ bUsePedNodeSeek = true;
+ m_pNextPathNode = nil;
+ if (walk)
+ SetMoveState(PEDMOVE_WALK);
+ }
// set by 0482:set_threat_reaction_range_multiplier opcode
static uint16 &nThreatReactionRangeMultiplier;