summaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-05-29 18:06:33 +0200
committeraap <aap@papnet.eu>2019-05-29 18:06:33 +0200
commit820fd66a94c20c4e1dab21f6abda4138eaefbe79 (patch)
tree445a810baf60f29c455dbaf4b3e82934806b49a8 /src/entities
parentmore CVehicleModelInfo (diff)
downloadre3-820fd66a94c20c4e1dab21f6abda4138eaefbe79.tar
re3-820fd66a94c20c4e1dab21f6abda4138eaefbe79.tar.gz
re3-820fd66a94c20c4e1dab21f6abda4138eaefbe79.tar.bz2
re3-820fd66a94c20c4e1dab21f6abda4138eaefbe79.tar.lz
re3-820fd66a94c20c4e1dab21f6abda4138eaefbe79.tar.xz
re3-820fd66a94c20c4e1dab21f6abda4138eaefbe79.tar.zst
re3-820fd66a94c20c4e1dab21f6abda4138eaefbe79.zip
Diffstat (limited to 'src/entities')
-rw-r--r--src/entities/Ped.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/entities/Ped.h b/src/entities/Ped.h
index c5ad863d..893b4771 100644
--- a/src/entities/Ped.h
+++ b/src/entities/Ped.h
@@ -1,6 +1,11 @@
#pragma once
#include "Physical.h"
+#include "Weapon.h"
+
+enum {
+ PED_MAX_WEAPONS = 13
+};
enum PedState
{
@@ -63,6 +68,14 @@ enum PedState
PED_ARRESTED,
};
+enum {
+ PEDMOVE_NONE,
+ PEDMOVE_STILL,
+ PEDMOVE_WALK,
+ PEDMOVE_RUN,
+ PEDMOVE_SPRINT,
+};
+
class CVehicle;
class CPed : public CPhysical
@@ -145,7 +158,9 @@ public:
uint8 m_ped_flagI80 : 1;
uint8 stuff1[199];
int32 m_nPedState;
- uint8 stuff2[196];
+ int32 m_nLastPedState;
+ int32 m_nMoveState;
+ uint8 stuff2[188];
CEntity *m_pCurrentPhysSurface;
CVector m_vecOffsetFromPhysSurface;
CEntity *m_pCurSurface;
@@ -157,7 +172,11 @@ public:
uint8 stuff5[28];
CEntity *m_pCollidingEntity;
- uint8 stuff6[496];
+ uint8 stuff6[12];
+ CWeapon m_weapons[PED_MAX_WEAPONS];
+ int32 stuff7;
+ uint8 m_currentWeapon;
+ uint8 stuff[167];
// static void *operator new(size_t);
// static void operator delete(void*, size_t);
@@ -165,10 +184,13 @@ public:
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);
+ CWeapon *GetWeapon(void) { return &m_weapons[m_currentWeapon]; }
};
static_assert(offsetof(CPed, m_nPedState) == 0x224, "CPed: error");
static_assert(offsetof(CPed, m_pCurSurface) == 0x2FC, "CPed: error");
static_assert(offsetof(CPed, m_pMyVehicle) == 0x310, "CPed: error");
static_assert(offsetof(CPed, m_nPedType) == 0x32C, "CPed: error");
static_assert(offsetof(CPed, m_pCollidingEntity) == 0x34C, "CPed: error");
+static_assert(offsetof(CPed, m_weapons) == 0x35C, "CPed: error");
+static_assert(offsetof(CPed, m_currentWeapon) == 0x498, "CPed: error");
static_assert(sizeof(CPed) == 0x540, "CPed: error");