diff options
author | eray orçunus <erayorcunus@gmail.com> | 2019-06-16 21:44:05 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2019-06-16 21:44:05 +0200 |
commit | beb6f0d4c75fa5f7be4998f78929e0a66fc9540c (patch) | |
tree | 8a1f28b7f4987d222c26749e99529f9002e0f0ca /src/entities | |
parent | CPed fixes and needed functions for further commits (diff) | |
parent | fix the cleanup... (diff) | |
download | re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.tar re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.tar.gz re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.tar.bz2 re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.tar.lz re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.tar.xz re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.tar.zst re3-beb6f0d4c75fa5f7be4998f78929e0a66fc9540c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/entities/Ped.cpp | 2 | ||||
-rw-r--r-- | src/entities/Ped.h | 23 | ||||
-rw-r--r-- | src/entities/PlayerInfo.cpp | 3 | ||||
-rw-r--r-- | src/entities/PlayerInfo.h | 71 | ||||
-rw-r--r-- | src/entities/PlayerPed.h | 67 |
5 files changed, 128 insertions, 38 deletions
diff --git a/src/entities/Ped.cpp b/src/entities/Ped.cpp index cb7d7923..fbd59b3e 100644 --- a/src/entities/Ped.cpp +++ b/src/entities/Ped.cpp @@ -423,4 +423,4 @@ STARTPATCHES InjectHook(0x4C63E0, (void (CPed::*)(float, bool)) &CPed::SetLookFlag, PATCH_JUMP); InjectHook(0x4D12E0, &CPed::SetLookTimer, PATCH_JUMP); InjectHook(0x4C5700, &CPed::OurPedCanSeeThisOne, PATCH_JUMP); -ENDPATCHES
\ No newline at end of file +ENDPATCHES diff --git a/src/entities/Ped.h b/src/entities/Ped.h index dfefeddf..a1f14afb 100644 --- a/src/entities/Ped.h +++ b/src/entities/Ped.h @@ -181,14 +181,31 @@ 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[12]; CPed* m_pSeekTarget; CVehicle *m_pMyVehicle; - bool bInVehicle; + Bool bInVehicle; uint8 stuff4[23]; int32 m_nPedType; PedStat *m_pedStats; @@ -252,4 +269,4 @@ static_assert(offsetof(CPed, m_lookTimer) == 0x4CC, "CPed: error"); static_assert(offsetof(CPed, m_bodyPartBleeding) == 0x4F2, "CPed: error"); static_assert(offsetof(CPed, m_field_16C) == 0x16C, "CPed: error"); static_assert(offsetof(CPed, m_pEventEntity) == 0x19C, "CPed: error"); -static_assert(sizeof(CPed) == 0x53C, "CPed: error");
\ No newline at end of file +static_assert(sizeof(CPed) == 0x53C, "CPed: error"); 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 08892277..6721f975 100644 --- a/src/entities/PlayerPed.h +++ b/src/entities/PlayerPed.h @@ -1,43 +1,42 @@ #pragma once #include "Ped.h" +#include "Wanted.h" -class CPlayerPed : public CPed -{ +class CPlayerPed : public CPed { public: - // All credits goes to DK22Pac - // 0x53C - int *m_pWanted; // CWanted * - int *m_pArrestingCop; // CCopPed *m_pArrestingCop; - float m_fMoveSpeed; - float m_fCurrentStamina; - float m_fMaxStamina; - float m_fStaminaProgress; - char m_bWeaponSlot; - uint8 m_bSpeedTimerFlag; - bool m_bShouldEvade; - char field_1367; - uint32 m_nSpeedTimer; - uint32 m_nShotDelay; - float field_1376; - char field_1380; - char field_1381; - char field_1382; - char field_1383; + 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; - int m_nTargettableObjects[4]; - bool m_bAdrenalineActive; - bool m_bHasLockOnTarget; - char field_1406; - char field_1407; - uint32 m_bAdrenalineTime; - bool m_bCanBeDamaged; - char field_1413; - char field_1414; - char field_1415; + 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]; - int field_1488[6]; - float field_1512; - float m_fFPSMoveHeading; + int32 field_1488[6]; + Float field_1512; + Float m_fFPSMoveHeading; }; + static_assert(sizeof(CPlayerPed) == 0x5F0, "CPlayerPed: error"); |