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.h59
1 files changed, 39 insertions, 20 deletions
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index 56e527c5..63d8e598 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -153,34 +153,34 @@ enum eWaitState {
enum eObjective : uint32 {
OBJECTIVE_NONE,
- OBJECTIVE_IDLE,
- OBJECTIVE_FLEE_TILL_SAFE,
+ OBJECTIVE_WAIT_ON_FOOT,
+ OBJECTIVE_FLEE_ON_FOOT_TILL_SAFE,
OBJECTIVE_GUARD_SPOT,
OBJECTIVE_GUARD_AREA, // not implemented
OBJECTIVE_WAIT_IN_CAR,
- OBJECTIVE_WAIT_IN_CAR_THEN_GETOUT,
+ OBJECTIVE_WAIT_IN_CAR_THEN_GET_OUT,
OBJECTIVE_KILL_CHAR_ON_FOOT,
OBJECTIVE_KILL_CHAR_ANY_MEANS,
OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE,
OBJECTIVE_FLEE_CHAR_ON_FOOT_ALWAYS,
OBJECTIVE_GOTO_CHAR_ON_FOOT,
- OBJECTIVE_FOLLOW_PED_IN_FORMATION,
- OBJECTIVE_LEAVE_VEHICLE,
+ OBJECTIVE_FOLLOW_CHAR_IN_FORMATION,
+ OBJECTIVE_LEAVE_CAR,
OBJECTIVE_ENTER_CAR_AS_PASSENGER,
OBJECTIVE_ENTER_CAR_AS_DRIVER,
- OBJECTIVE_FOLLOW_CAR_IN_CAR, // seems not implemented so far
- OBJECTIVE_FIRE_AT_OBJ_FROM_VEHICLE, // not implemented
- OBJECTIVE_DESTROY_OBJ, // not implemented
+ OBJECTIVE_FOLLOW_CAR_IN_CAR, // not implemented
+ OBJECTIVE_FIRE_AT_OBJECT_FROM_VEHICLE, // not implemented
+ OBJECTIVE_DESTROY_OBJECT, // not implemented
OBJECTIVE_DESTROY_CAR,
OBJECTIVE_GOTO_AREA_ANY_MEANS,
OBJECTIVE_GOTO_AREA_ON_FOOT,
OBJECTIVE_RUN_TO_AREA,
- OBJECTIVE_23, // not implemented
- OBJECTIVE_24, // not implemented
- OBJECTIVE_FIGHT_CHAR,
+ OBJECTIVE_GOTO_AREA_IN_CAR, // not implemented
+ OBJECTIVE_FOLLOW_CAR_ON_FOOT_WITH_OFFSET, // not implemented
+ OBJECTIVE_GUARD_ATTACK,
OBJECTIVE_SET_LEADER,
OBJECTIVE_FOLLOW_ROUTE,
- OBJECTIVE_SOLICIT,
+ OBJECTIVE_SOLICIT_VEHICLE,
OBJECTIVE_HAIL_TAXI,
OBJECTIVE_CATCH_TRAIN,
OBJECTIVE_BUY_ICE_CREAM,
@@ -231,7 +231,7 @@ enum PedState
PED_PURSUE,
PED_FOLLOW_PATH,
PED_SNIPER_MODE,
- PED_ROCKET_ODE,
+ PED_ROCKET_MODE,
PED_DUMMY,
PED_PAUSE,
PED_ATTACK,
@@ -385,9 +385,8 @@ public:
#ifdef PED_SKIN
uint32 bDontAcceptIKLookAts : 1; // TODO: find uses of this
#endif
- // our own flags
- uint32 m_ped_flagI40 : 1; // bMakePedsRunToPhonesToReportCrimes makes use of this as runover by car indicator
- uint32 m_ped_flagI80 : 1; // KANGAROO_CHEAT define makes use of this as cheat toggle
+ uint32 m_ped_flagI40 : 1;
+ uint32 m_ped_flagI80 : 1; // originally unused, KANGAROO_CHEAT define makes use of this as cheat toggle
uint8 CharCreatedBy;
eObjective m_objective;
@@ -454,6 +453,10 @@ public:
float m_distanceToCountSeekDone;
bool bRunningToPhone;
int16 m_phoneId;
+#ifdef PEDS_REPORT_CRIMES_ON_PHONE
+ bool m_facePhoneStart;
+ CEntity *m_victimOfPlayerCrime;
+#endif
eCrimeType m_crimeToReportOnPhone;
uint32 m_phoneTalkTimer;
CAccident *m_lastAccident;
@@ -468,7 +471,7 @@ public:
CEntity *m_pCollidingEntity;
uint8 m_stateUnused;
uint32 m_timerUnused;
- CVector2D *m_wanderRangeBounds; // array with 2 CVector2D (actually unused CRange2D class) - unused
+ class CRange2D *m_wanderRangeBounds;
CWeapon m_weapons[WEAPONTYPE_TOTAL_INVENTORY_WEAPONS];
eWeaponType m_storedWeapon;
uint8 m_currentWeapon; // eWeaponType
@@ -477,7 +480,7 @@ public:
uint8 m_wepAccuracy;
CEntity *m_pPointGunAt;
CVector m_vecHitLastPos;
- uint32 m_lastFightMove;
+ uint32 m_curFightMove;
uint8 m_fightButtonPressure;
FightState m_fightState;
bool m_takeAStepAfterAttack;
@@ -588,6 +591,9 @@ public:
bool MakePhonecall(void);
bool FacePhone(void);
CPed *CheckForDeadPeds(void);
+#ifdef PEDS_REPORT_CRIMES_ON_PHONE
+ int32 CheckForPlayerCrimes(CPed *victim = nil);
+#endif
bool CheckForExplosions(CVector2D &area);
CPed *CheckForGunShots(void);
PointBlankNecessity CheckForPointBlankPeds(CPed*);
@@ -796,6 +802,7 @@ public:
bool Dying(void) { return m_nPedState == PED_DIE; }
bool DyingOrDead(void) { return m_nPedState == PED_DIE || m_nPedState == PED_DEAD; }
bool OnGround(void) { return m_nPedState == PED_FALL || m_nPedState == PED_DIE || m_nPedState == PED_DEAD; }
+ bool OnGroundOrGettingUp(void) { return OnGround() || m_nPedState == PED_GETUP; }
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.
@@ -872,15 +879,27 @@ public:
static bool bPedCheat3;
static CVector2D ms_vec2DFleePosition;
-#ifdef TOGGLEABLE_BETA_FEATURES
+#ifdef DEBUGMENU
static bool bPopHeadsOnHeadshot;
- static bool bMakePedsRunToPhonesToReportCrimes;
#endif
#ifndef MASTER
// Mobile things
+ void DebugDrawPedDestination(CPed *, int, int);
+ void DebugDrawPedDesiredHeading(CPed *, int, int);
+ void DebugDrawCollisionRadius(float, float, float, float, int);
+ void DebugDrawVisionRange(CVector, float);
+ void DebugDrawVisionSimple(CVector, float);
+ void DebugDrawLook();
+ void DebugDrawPedPsyche();
+ void DebugDrawDebugLines();
+
static void SwitchDebugDisplay(void);
+ static int GetDebugDisplay(void);
+
+ void DebugDrawLookAtPoints();
void DebugRenderOnePedText(void);
+ void DebugRenderClosePedText();
#endif
#ifdef PED_SKIN