summaryrefslogtreecommitdiffstats
path: root/src/entities
diff options
context:
space:
mode:
author_AG <gennariarmando@outlook.com>2019-06-15 01:34:19 +0200
committer_AG <gennariarmando@outlook.com>2019-06-15 01:34:36 +0200
commit92cc1cf3af5c5454eddd464e42c495d3739a1cce (patch)
tree1de213d2ed114443e28a72e486af0c173b8b3b1a /src/entities
parentMerge pull request #15 from ShFil119/patch-1 (diff)
downloadre3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.tar
re3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.tar.gz
re3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.tar.bz2
re3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.tar.lz
re3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.tar.xz
re3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.tar.zst
re3-92cc1cf3af5c5454eddd464e42c495d3739a1cce.zip
Diffstat (limited to 'src/entities')
-rw-r--r--src/entities/Ped.cpp2
-rw-r--r--src/entities/Ped.h24
-rw-r--r--src/entities/PlayerInfo.cpp3
-rw-r--r--src/entities/PlayerInfo.h71
-rw-r--r--src/entities/PlayerPed.h39
5 files changed, 131 insertions, 8 deletions
diff --git a/src/entities/Ped.cpp b/src/entities/Ped.cpp
index 55e33a2d..90ee54be 100644
--- a/src/entities/Ped.cpp
+++ b/src/entities/Ped.cpp
@@ -6,7 +6,7 @@
Bool &CPed::bNastyLimbsCheat = *(Bool*)0x95CD44;
Bool &CPed::bPedCheat2 = *(Bool*)0x95CD5A;
Bool &CPed::bPedCheat3 = *(Bool*)0x95CD59;
-
+
void *CPed::operator new(size_t sz) { return CPools::GetPedPool()->New(); }
void CPed::operator delete(void *p, size_t sz) { CPools::GetPedPool()->Delete((CPed*)p); }
diff --git a/src/entities/Ped.h b/src/entities/Ped.h
index adf24c88..28ad6624 100644
--- a/src/entities/Ped.h
+++ b/src/entities/Ped.h
@@ -2,6 +2,7 @@
#include "Physical.h"
#include "Weapon.h"
+#include "PathFind.h"
enum {
PED_MAX_WEAPONS = 13
@@ -163,13 +164,30 @@ public:
int32 m_nPedState;
int32 m_nLastPedState;
int32 m_nMoveState;
- uint8 stuff2[188];
+ int32 m_nStoredActionState;
+ int32 m_nPrevActionState;
+ int32 m_nWaitState;
+ int32 m_nWaitTimer;
+private:
+ uint32 stuff0[28];
+public:
+ uint16 m_nPathNodes;
+ uint8 m_nCurPathNode;
+ int8 m_nPathState;
+private:
+ int8 _pad2B5[3];
+public:
+ CPathNode *m_pNextPathNode;
+ CPathNode *m_pLastPathNode;
+ Float m_fHealth;
+ Float m_fArmour;
+ uint8 stuff2[34];
CEntity *m_pCurrentPhysSurface;
CVector m_vecOffsetFromPhysSurface;
CEntity *m_pCurSurface;
uint8 stuff3[16];
CVehicle *m_pMyVehicle;
- bool bInVehicle;
+ Bool bInVehicle;
uint8 stuff4[23];
int32 m_nPedType;
@@ -188,7 +206,7 @@ public:
bool UseGroundColModel(void);
void KillPedWithCar(CVehicle *veh, float impulse);
CWeapon *GetWeapon(void) { return &m_weapons[m_currentWeapon]; }
-
+
static Bool &bNastyLimbsCheat;
static Bool &bPedCheat2;
static Bool &bPedCheat3;
diff --git a/src/entities/PlayerInfo.cpp b/src/entities/PlayerInfo.cpp
new file mode 100644
index 00000000..796481a4
--- /dev/null
+++ b/src/entities/PlayerInfo.cpp
@@ -0,0 +1,3 @@
+#include "common.h"
+#include "patcher.h"
+#include "PlayerInfo.h"
diff --git a/src/entities/PlayerInfo.h b/src/entities/PlayerInfo.h
new file mode 100644
index 00000000..eb15f53f
--- /dev/null
+++ b/src/entities/PlayerInfo.h
@@ -0,0 +1,71 @@
+#pragma once
+#include "Automobile.h"
+#include "PlayerPed.h"
+
+enum eWastedBustedState {
+ WBSTATE_PLAYING = 0x0,
+ WBSTATE_WASTED = 0x1,
+ WBSTATE_BUSTED = 0x2,
+ WBSTATE_FAILED_CRITICAL_MISSION = 0x3,
+};
+
+struct CCivilianPed {
+
+};
+
+class CPlayerInfo {
+public:
+ CPlayerPed *m_pPed;
+ CVehicle *m_pRemoteVehicle;
+ CColModel m_ColModel;
+ CVehicle *m_pVehicleEx;
+ char m_aszPlayerName[70];
+private:
+ int8 _pad0[2];
+public:
+ int32 m_nMoney;
+ int32 m_nVisibleMoney;
+ int32 m_nCollectedPackages;
+ int32 m_nTotalPackages;
+ int32 field_188;
+ int32 m_nSwitchTaxiTime;
+ Bool m_bSwitchTaxi;
+ int8 field_197;
+ int8 field_198;
+ int8 field_199;
+ int32 m_nNextSexFrequencyUpdateTime;
+ int32 m_nNextSexMoneyUpdateTime;
+ int32 m_nSexFrequency;
+ CCivilianPed *m_pHooker;
+ int8 m_bWBState; // eWastedBustedState
+ int8 field_217;
+ int8 field_218;
+ int8 field_219;
+ int32 m_nWBTime;
+ Bool m_bInRemoteMode;
+ int8 field_225;
+ int8 field_226;
+ int8 field_227;
+ int32 m_nTimeLostRemoteCar;
+ int32 m_nTimeLastHealthLoss;
+ int32 m_nTimeLastArmourLoss;
+ int32 field_240;
+ int32 m_nUpsideDownCounter;
+ int32 field_248;
+ int16 m_nTrafficMultiplier;
+ int8 field_254;
+ int8 field_255;
+ Float m_fRoadDensity;
+ int32 m_nPreviousTimeRewardedForExplosion;
+ int32 m_nExplosionsSinceLastReward;
+ int32 field_268;
+ int32 field_272;
+ Bool m_bInfiniteSprint;
+ Bool m_bFastReload;
+ Bool m_bGetOutOfJailFree;
+ Bool m_bGetOutOfHospitalFree;
+ uint8 m_aSkinName[32];
+ RwTexture *m_pSkinTexture;
+};
+
+static_assert(sizeof(CPlayerInfo) == 0x13C, "CPlayerPed: error");
diff --git a/src/entities/PlayerPed.h b/src/entities/PlayerPed.h
index 35128f46..6721f975 100644
--- a/src/entities/PlayerPed.h
+++ b/src/entities/PlayerPed.h
@@ -1,11 +1,42 @@
#pragma once
#include "Ped.h"
+#include "Wanted.h"
-class CPlayerPed : public CPed
-{
+class CPlayerPed : public CPed {
public:
- // 0x53C
- uint8 stuff[180];
+ CWanted *m_pWanted;
+ CCopPed *m_pArrestingCop;
+ Float m_fMoveSpeed;
+ Float m_fCurrentStamina;
+ Float m_fMaxStamina;
+ Float m_fStaminaProgress;
+ Bool m_bWeaponSlot;
+ Bool m_bSpeedTimerFlag;
+ Bool m_bShouldEvade;
+ int8 field_1367;
+ int32 m_nSpeedTimer;
+ int32 m_nShotDelay;
+ Float field_1376;
+ int8 field_1380;
+ int8 field_1381;
+ int8 field_1382;
+ int8 field_1383;
+ CEntity *m_pEvadingFrom;
+ int32 m_nTargettableObjects[4];
+ Bool m_bAdrenalineActive;
+ Bool m_bHasLockOnTarget;
+ int8 field_1406;
+ int8 field_1407;
+ Bool m_bAdrenalineTime;
+ Bool m_bCanBeDamaged;
+ int8 field_1413;
+ int8 field_1414;
+ int8 field_1415;
+ CVector field_1416[6];
+ int32 field_1488[6];
+ Float field_1512;
+ Float m_fFPSMoveHeading;
};
+
static_assert(sizeof(CPlayerPed) == 0x5F0, "CPlayerPed: error");