re3/src/core/PlayerInfo.h

124 lines
3.2 KiB
C
Raw Normal View History

2019-06-14 23:34:19 +00:00
#pragma once
2019-06-29 09:09:33 +00:00
#include "ColModel.h"
2019-06-14 23:34:19 +00:00
enum eWastedBustedState
{
WBSTATE_PLAYING,
WBSTATE_WASTED,
WBSTATE_BUSTED,
WBSTATE_FAILED_CRITICAL_MISSION,
2019-06-14 23:34:19 +00:00
};
2020-12-07 00:59:17 +00:00
enum eBustedAudioState
2020-05-31 17:59:01 +00:00
{
BUSTEDAUDIO_NONE,
BUSTEDAUDIO_LOADING,
BUSTEDAUDIO_DONE
};
2019-12-02 20:02:32 +00:00
class CEntity;
class CPed;
2019-06-29 09:09:33 +00:00
class CVehicle;
class CPlayerPed;
class CCivilianPed;
2019-06-14 23:34:19 +00:00
class CPlayerInfo
{
2019-06-14 23:34:19 +00:00
public:
CPlayerPed *m_pPed;
CVehicle *m_pRemoteVehicle;
CColModel m_ColModel;
CVehicle *m_pVehicleEx; // vehicle using the col model above
2019-06-29 09:09:33 +00:00
char m_aPlayerName[70];
2019-06-14 23:34:19 +00:00
int32 m_nMoney;
int32 m_nVisibleMoney;
int32 m_nCollectedPackages;
int32 m_nTotalPackages;
2019-09-03 16:53:04 +00:00
uint32 m_nLastBumpPlayerCarTimer;
2019-12-09 23:02:02 +00:00
uint32 m_nUnusedTaxiTimer;
bool m_bUnusedTaxiThing;
uint32 m_nNextSexFrequencyUpdateTime;
uint32 m_nNextSexMoneyUpdateTime;
2019-06-14 23:34:19 +00:00
int32 m_nSexFrequency;
CCivilianPed *m_pHooker;
2019-06-29 09:09:33 +00:00
int8 m_WBState; // eWastedBustedState
2019-12-02 20:02:32 +00:00
uint32 m_nWBTime;
2019-06-16 22:16:38 +00:00
bool m_bInRemoteMode;
bool field_D5;
bool field_D6;
2019-07-25 14:33:37 +00:00
uint32 m_nTimeLostRemoteCar;
uint32 m_nTimeLastHealthLoss;
uint32 m_nTimeLastArmourLoss;
uint32 m_nTimeTankShotGun;
2019-06-14 23:34:19 +00:00
int32 m_nUpsideDownCounter;
int32 field_EC;
int32 m_nTimeCarSpentOnTwoWheels;
int32 m_nDistanceCarTravelledOnTwoWheels;
int32 m_nTimeNotFullyOnGround;
int32 m_nTimeSpentOnWheelie;
float m_nDistanceTravelledOnWheelie;
int32 m_nTimeSpentOnStoppie;
float m_nDistanceTravelledOnStoppie;
int32 m_nCancelWheelStuntTimer;
2020-08-14 15:54:01 +00:00
int32 m_nLastTimeCarSpentOnTwoWheels;
int32 m_nLastDistanceCarTravelledOnTwoWheels;
int32 m_nLastTimeSpentOnWheelie;
int32 m_nLastDistanceTravelledOnWheelie;
int32 m_nLastTimeSpentOnStoppie;
int32 m_nLastDistanceTravelledOnStoppie;
2019-06-14 23:34:19 +00:00
int16 m_nTrafficMultiplier;
int16 field_12A;
2019-06-16 22:16:38 +00:00
float m_fRoadDensity;
uint32 m_nPreviousTimeRewardedForExplosion;
uint32 m_nExplosionsSinceLastReward;
2020-05-21 23:42:04 +00:00
uint32 m_nHavocLevel;
2020-05-24 13:14:27 +00:00
float m_fMediaAttention;
2019-06-16 22:16:38 +00:00
bool m_bInfiniteSprint;
bool m_bFastReload;
2020-05-16 20:06:33 +00:00
bool m_bFireproof;
uint8 m_nMaxHealth;
uint8 m_nMaxArmour;
2019-06-16 22:16:38 +00:00
bool m_bGetOutOfJailFree;
bool m_bGetOutOfHospitalFree;
2020-05-17 17:36:48 +00:00
bool m_bDriveByAllowed;
2020-12-07 00:59:17 +00:00
uint8 m_nBustedAudioStatus;
2020-05-31 17:59:01 +00:00
int16 m_nCurrentBustedAudio;
#ifdef GTA_PC
2019-07-10 07:57:08 +00:00
char m_aSkinName[32];
2019-06-14 23:34:19 +00:00
RwTexture *m_pSkinTexture;
#endif
2019-07-03 22:16:24 +00:00
void MakePlayerSafe(bool);
2020-05-05 01:45:18 +00:00
const CVector &GetPos();
2019-09-12 00:43:18 +00:00
void Process(void);
2019-10-07 21:29:30 +00:00
void KillPlayer(void);
void ArrestPlayer(void);
2019-10-21 21:39:59 +00:00
bool IsPlayerInRemoteMode(void);
void PlayerFailedCriticalMission(void);
2019-12-02 20:02:32 +00:00
void Clear(void);
2020-05-21 23:42:04 +00:00
void BlowUpRCBuggy(bool);
2019-12-02 20:02:32 +00:00
void CancelPlayerEnteringCars(CVehicle*);
bool IsRestartingAfterDeath(void);
bool IsRestartingAfterArrest(void);
void EvaluateCarPosition(CEntity*, CPed*, float, float*, CVehicle**);
void LoadPlayerInfo(uint8 *buf, uint32 size);
void SavePlayerInfo(uint8 *buf, uint32* size);
2019-12-09 23:02:02 +00:00
void FindClosestCarSectorList(CPtrList&, CPed*, float, float, float, float, float*, CVehicle**);
2019-12-02 20:02:32 +00:00
#ifdef GTA_PC
void LoadPlayerSkin();
void SetPlayerSkin(const char *skin);
void DeletePlayerSkin();
#endif
2019-06-14 23:34:19 +00:00
};
CPlayerPed *FindPlayerPed(void);
CVehicle *FindPlayerVehicle(void);
CVehicle *FindPlayerTrain(void);
CEntity *FindPlayerEntity(void);
CVector FindPlayerCoors(void);
const CVector &FindPlayerSpeed(void);
const CVector &FindPlayerCentreOfWorld(int32 player);
const CVector &FindPlayerCentreOfWorld_NoSniperShift(void);
float FindPlayerHeading(void);