summaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/entities/Object.h1
-rw-r--r--src/entities/Ped.cpp164
-rw-r--r--src/entities/Ped.h61
-rw-r--r--src/entities/Physical.h15
4 files changed, 226 insertions, 15 deletions
diff --git a/src/entities/Object.h b/src/entities/Object.h
index e0b8dd91..d71b155e 100644
--- a/src/entities/Object.h
+++ b/src/entities/Object.h
@@ -16,7 +16,6 @@ public:
CMatrix m_objectMatrix;
float m_fUprootLimit;
int8 ObjectCreatedBy;
-// int8 m_nObjectFlags;
int8 m_obj_flag1 : 1;
int8 m_obj_flag2 : 1;
int8 m_obj_flag4 : 1;
diff --git a/src/entities/Ped.cpp b/src/entities/Ped.cpp
index 2d97545e..0d83ed97 100644
--- a/src/entities/Ped.cpp
+++ b/src/entities/Ped.cpp
@@ -7,3 +7,167 @@
//void CPed::operator delete(void *p, size_t sz) { CPools::GetPedPool()->Delete((CPed*)p); }
WRAPPER void CPed::KillPedWithCar(CVehicle *veh, float impulse) { EAXJMP(0x4EC430); }
+
+static char ObjectiveText[34][28] = {
+ "No Obj",
+ "Wait on Foot",
+ "Flee on Foot Till Safe",
+ "Guard Spot",
+ "Guard Area",
+ "Wait in Car",
+ "Wait in Car then Getout",
+ "Kill Char on Foot",
+ "Kill Char Any Means",
+ "Flee Char on Foot Till Safe",
+ "Flee Char on Foot Always",
+ "GoTo Char on Foot",
+ "Follow Char in Formation",
+ "Leave Car",
+ "Enter Car as Passenger",
+ "Enter Car as Driver",
+ "Follow Car in Car",
+ "Fire at Obj from Vehicle",
+ "Destroy Obj",
+ "Destroy Car",
+ "GoTo Area Any Means",
+ "GoTo Area on Foot",
+ "Run to Area",
+ "GoTo Area in Car",
+ "Follow Car on Foot Woffset",
+ "Guard Attack",
+ "Set Leader",
+ "Follow Route",
+ "Solicit",
+ "Take Taxi",
+ "Catch Train",
+ "Buy IceCream",
+ "Steal Any Car",
+ "Mug Char",
+};
+
+static char StateText[56][18] = {
+ "None", // 1
+ "Idle",
+ "Look Entity",
+ "Look Heading",
+ "Wander Range",
+ "Wander Path",
+ "Seek Pos",
+ "Seek Entity",
+ "Flee Pos",
+ "Flee Entity",
+ "Pursue",
+ "Follow Path",
+ "Sniper Mode",
+ "Rocket Mode",
+ "Dummy",
+ "Pause",
+ "Attack",
+ "Fight",
+ "Face Phone",
+ "Make Call",
+ "Chat",
+ "Mug",
+ "AimGun",
+ "AI Control",
+ "Seek Car",
+ "Seek InBoat",
+ "Follow Route",
+ "C.P.R.",
+ "Solicit",
+ "Buy IceCream",
+ "Investigate",
+ "Step away",
+ "STATES_NO_AI",
+ "On Fire",
+ "Jump",
+ "Fall",
+ "GetUp",
+ "Stagger",
+ "Dive away",
+ "STATES_NO_ST",
+ "Enter Train",
+ "Exit Train",
+ "Arrest Plyr",
+ "Driving",
+ "Passenger",
+ "Taxi Passngr",
+ "Open Door",
+ "Die",
+ "Dead",
+ "CarJack",
+ "Drag fm Car",
+ "Enter Car",
+ "Steal Car",
+ "Exit Car",
+ "Hands Up",
+ "Arrested",
+};
+
+static char PersonalityTypeText[32][18] = {
+ "Player",
+ "Cop",
+ "Medic",
+ "Fireman",
+ "Gang 1",
+ "Gang 2",
+ "Gang 3",
+ "Gang 4",
+ "Gang 5",
+ "Gang 6",
+ "Gang 7",
+ "Street Guy",
+ "Suit Guy",
+ "Sensible Guy",
+ "Geek Guy",
+ "Old Guy",
+ "Tough Guy",
+ "Street Girl",
+ "Suit Girl",
+ "Sensible Girl",
+ "Geek Girl",
+ "Old Girl",
+ "Tough Girl",
+ "Tramp",
+ "Tourist",
+ "Prostitute",
+ "Criminal",
+ "Busker",
+ "Taxi Driver",
+ "Psycho",
+ "Steward",
+ "Sports Fan",
+};
+
+static char WaitStateText[21][16] = {
+ "No Wait",
+ "Traffic Lights",
+ "Pause CrossRoad",
+ "Look CrossRoad",
+ "Look Ped",
+ "Look Shop",
+ "Look Accident",
+ "FaceOff Gang",
+ "Double Back",
+ "Hit Wall",
+ "Turn 180deg",
+ "Surprised",
+ "Ped Stuck",
+ "Look About",
+ "Play Duck",
+ "Play Cower",
+ "Play Taxi",
+ "Play HandsUp",
+ "Play HandsCower",
+ "Play Chat",
+ "Finish Flee",
+};
+
+bool
+CPed::UseGroundColModel(void)
+{
+ return m_nPedState == PED_FALL ||
+ m_nPedState == PED_DIVE_AWAY ||
+ m_nPedState == PED_DIE ||
+ m_nPedState == PED_DEAD;
+}
diff --git a/src/entities/Ped.h b/src/entities/Ped.h
index 4236340e..c5ad863d 100644
--- a/src/entities/Ped.h
+++ b/src/entities/Ped.h
@@ -2,9 +2,65 @@
#include "Physical.h"
-enum PedAction
+enum PedState
{
- PED_PASSENGER = 44,
+ // This is a bit strange...shouldn't PED_NONE be 0?
+ PED_NONE = 1,
+ PED_IDLE,
+ PED_LOOK_ENTITY,
+ PED_LOOK_HEADING,
+ PED_WANDER_RANGE,
+ PED_WANDER_PATH,
+ PED_SEEK_POS,
+ PED_SEEK_ENTITY,
+ PED_FLEE_POS,
+ PED_FLEE_ENTITY,
+ PED_PURSUE,
+ PED_FOLLOW_PATH,
+ PED_SNIPER_MODE,
+ PED_ROCKET_ODE,
+ PED_DUMMY,
+ PED_PAUSE,
+ PED_ATTACK,
+ PED_FIGHT,
+ PED_FACE_PHONE,
+ PED_MAKE_CALL,
+ PED_CHAT,
+ PED_MUG,
+ PED_AIM_GUN,
+ PED_AI_CONTROL,
+ PED_SEEK_CAR,
+ PED_SEEK_IN_BOAT,
+ PED_FOLLOW_ROUTE,
+ PED_CPR,
+ PED_SOLICIT,
+ PED_BUY_ICECREAM,
+ PED_INVESTIGATE,
+ PED_STEP_AWAY,
+ PED_STATES_NO_AI,
+ PED_ON_FIRE,
+ PED_JUMP,
+ PED_FALL,
+ PED_GETUP,
+ PED_STAGGER,
+ PED_DIVE_AWAY,
+ PED_STATES_NO_ST,
+ PED_ENTER_TRAIN,
+ PED_EXIT_TRAIN,
+ PED_ARREST_PLAYER,
+ PED_DRIVING,
+ PED_PASSENGER,
+ PED_TAXI_PASSENGER,
+ PED_OPEN_DOOR,
+ PED_DIE,
+ PED_DEAD,
+ PED_CARJACK,
+ PED_DRAG_FROM_CAR,
+ PED_ENTER_CAR,
+ PED_STEAL_CAR,
+ PED_EXIT_CAR,
+ PED_HANDS_UP,
+ PED_ARRESTED,
};
class CVehicle;
@@ -107,6 +163,7 @@ public:
// static void operator delete(void*, size_t);
bool IsPlayer(void) { return m_nPedType == 0 || m_nPedType== 1 || m_nPedType == 2 || m_nPedType == 3; }
+ bool UseGroundColModel(void);
void KillPedWithCar(CVehicle *veh, float impulse);
};
static_assert(offsetof(CPed, m_nPedState) == 0x224, "CPed: error");
diff --git a/src/entities/Physical.h b/src/entities/Physical.h
index 06ae3166..514994f7 100644
--- a/src/entities/Physical.h
+++ b/src/entities/Physical.h
@@ -58,18 +58,9 @@ public:
uint8 m_phy_flagA40 : 1;
uint8 m_phy_flagA80 : 1;
- uint8 m_phy_flagB1 : 1;
- uint8 m_phy_flagB2 : 1;
- uint8 m_phy_flagB4 : 1;
- uint8 m_phy_flagB8 : 1;
- uint8 m_phy_flagB10 : 1;
- uint8 m_phy_flagB20 : 1;
- uint8 m_phy_flagB40 : 1;
- uint8 m_phy_flagB80 : 1;
-
- char byteLastCollType;
- char byteZoneLevel;
- int16 pad;
+ uint8 m_nLastCollType;
+ uint8 m_nZoneLevel;
+ uint8 pad[3];
// from CEntity