summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/peds/Ped.h')
-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;