New updates for Hud.cpp and more.

This commit is contained in:
_AG
2019-06-15 01:34:19 +02:00
parent 8b55b8b144
commit 92cc1cf3af
28 changed files with 2062 additions and 38 deletions

View File

@ -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); }

View File

@ -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;

View File

@ -0,0 +1,3 @@
#include "common.h"
#include "patcher.h"
#include "PlayerInfo.h"

71
src/entities/PlayerInfo.h Normal file
View File

@ -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");

View File

@ -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");