diff options
Diffstat (limited to 'src/peds/Ped.h')
-rw-r--r-- | src/peds/Ped.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/peds/Ped.h b/src/peds/Ped.h index ff72a982..c6c4fcee 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -5,7 +5,7 @@ #include "Crime.h" #include "EventList.h" #include "PedIK.h" -#include "PedStats.h" +#include "PedType.h" #include "Physical.h" #include "Weapon.h" #include "WeaponInfo.h" @@ -15,6 +15,7 @@ #define FEET_OFFSET 1.04f #define CHECK_NEARBY_THINGS_MAX_DIST 15.0f #define ENTER_CAR_MAX_DIST 30.0f +#define CAN_SEE_ENTITY_ANGLE_THRESHOLD DEGTORAD(60.0f) class CAccident; class CObject; @@ -652,6 +653,7 @@ public: CPed(uint32 pedType); ~CPed(void); + void DeleteRwObject(); void SetModelIndex(uint32 mi); void ProcessControl(void); void Teleport(CVector); @@ -701,7 +703,7 @@ public: void CalculateNewOrientation(void); float WorkOutHeadingForMovingFirstPerson(float); void CalculateNewVelocity(void); - bool CanSeeEntity(CEntity*, float); + bool CanSeeEntity(CEntity*, float threshold = CAN_SEE_ENTITY_ANGLE_THRESHOLD); void RestorePreviousObjective(void); void SetIdle(void); #ifdef _MSC_VER @@ -771,6 +773,7 @@ public: void SetFall(int, AnimationId, uint8); void SetFlee(CEntity*, int); void SetFlee(CVector2D const &, int); + void RemoveDrivebyAnims(void); void RemoveInCarAnims(void); void CollideWithPed(CPed*); void SetDirectionToWalkAroundObject(CEntity*); @@ -907,7 +910,7 @@ public: static void PedAnimShuffleCB(CAnimBlendAssociation *assoc, void *arg); static void PedSetGetInCarPositionCB(CAnimBlendAssociation* assoc, void* arg); - bool IsPlayer(void); + bool IsPlayer(void) const; bool IsFemale(void) { return m_nPedType == PEDTYPE_CIVFEMALE || m_nPedType == PEDTYPE_PROSTITUTE; } bool UseGroundColModel(void); bool CanSetPedState(void); @@ -927,7 +930,7 @@ public: void SetStoredObjective(void); void SetLeader(CEntity* leader); void SetPedStats(ePedStats); - bool IsGangMember(void); + bool IsGangMember(void) const; void Die(void); #ifdef GTA_TRAIN void EnterTrain(void); @@ -953,7 +956,7 @@ public: void UpdatePosition(void); CObject *SpawnFlyingComponent(int, int8); void SetCarJack_AllClear(CVehicle*, uint32, uint32); - bool CanPedJumpThis(CEntity*, CVector*); + bool CanPedJumpThis(CEntity *unused, CVector *damageNormal = nil); void SetNewAttraction(CPedAttractor* pAttractor, const CVector& pos, float, float, int); void ClearWaitState(void); void Undress(const char*); @@ -983,7 +986,7 @@ public: bool Driving(void) { return m_nPedState == PED_DRIVING; } bool InVehicle(void) { return bInVehicle && m_pMyVehicle; } // True when ped is sitting/standing in vehicle, not in enter/exit state. bool EnteringCar(void) { return m_nPedState == PED_ENTER_CAR || m_nPedState == PED_CARJACK; } - bool HasAttractor(void) { return m_attractor != nil; } + bool HasAttractor(void); bool IsUseAttractorObjective(eObjective obj) { return obj == OBJECTIVE_GOTO_ATM_ON_FOOT || obj == OBJECTIVE_GOTO_ICE_CREAM_VAN_ON_FOOT || obj == OBJECTIVE_GOTO_PIZZA_ON_FOOT || obj == OBJECTIVE_GOTO_SEAT_ON_FOOT || @@ -992,7 +995,10 @@ public: void ReplaceWeaponWhenExitingVehicle(void); void RemoveWeaponWhenEnteringVehicle(void); - bool IsNotInWreckedVehicle(); + bool IsNotInWreckedVehicle() + { + return m_pMyVehicle != nil && ((CEntity*)m_pMyVehicle)->GetStatus() != STATUS_WRECKED; + } // My names. Inlined in VC AnimationId GetFireAnimNotDucking(CWeaponInfo* weapon) { |