2019-06-02 15:13:56 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Ped.h"
|
2020-03-28 14:47:52 +00:00
|
|
|
|
|
|
|
class CPad;
|
|
|
|
class CCopPed;
|
|
|
|
class CWanted;
|
2019-06-02 15:13:56 +00:00
|
|
|
|
2019-06-17 00:10:55 +00:00
|
|
|
class CPlayerPed : public CPed
|
|
|
|
{
|
2019-06-02 15:13:56 +00:00
|
|
|
public:
|
2019-06-14 23:34:19 +00:00
|
|
|
CWanted *m_pWanted;
|
|
|
|
CCopPed *m_pArrestingCop;
|
2019-06-16 22:16:38 +00:00
|
|
|
float m_fMoveSpeed;
|
|
|
|
float m_fCurrentStamina;
|
|
|
|
float m_fMaxStamina;
|
|
|
|
float m_fStaminaProgress;
|
2020-01-11 17:36:46 +00:00
|
|
|
int8 m_nSelectedWepSlot; // eWeaponType
|
2019-06-16 22:16:38 +00:00
|
|
|
bool m_bSpeedTimerFlag;
|
2020-02-13 20:34:36 +00:00
|
|
|
uint8 m_nEvadeAmount;
|
2020-05-15 14:30:25 +00:00
|
|
|
uint32 m_nSpeedTimer; // m_nStandStillTimer?
|
|
|
|
uint32 m_nHitAnimDelayTimer; // m_nShotDelay?
|
2020-04-15 17:34:58 +00:00
|
|
|
float m_fAttackButtonCounter;
|
2020-01-23 20:21:50 +00:00
|
|
|
bool m_bHaveTargetSelected; // may have better name
|
|
|
|
CEntity *m_pEvadingFrom; // is this CPhysical?
|
2019-06-14 23:34:19 +00:00
|
|
|
int32 m_nTargettableObjects[4];
|
2020-05-15 14:30:25 +00:00
|
|
|
uint32 m_nAdrenalineTime;
|
|
|
|
uint8 m_nDrunkenness; // Needed to work out whether we lost target this frame
|
|
|
|
uint8 m_nFadeDrunkenness;
|
|
|
|
uint8 m_nDrunkCountdown; //countdown in frames when the drunk effect ends
|
2019-06-16 22:16:38 +00:00
|
|
|
bool m_bAdrenalineActive;
|
|
|
|
bool m_bHasLockOnTarget;
|
|
|
|
bool m_bCanBeDamaged;
|
2020-05-15 14:30:25 +00:00
|
|
|
bool m_bDrunkVisualsWearOff; // TODO(Miami): That may be something else
|
2019-08-01 22:04:30 +00:00
|
|
|
CVector m_vecSafePos[6]; // safe places from the player, for example behind a tree
|
2019-09-29 16:44:51 +00:00
|
|
|
CPed *m_pPedAtSafePos[6];
|
2020-07-21 02:59:31 +00:00
|
|
|
CPed *m_pMeleeList[6]; // reachable peds at each direction(6)
|
2020-05-15 14:30:25 +00:00
|
|
|
char unused1;
|
|
|
|
int16 m_nCheckPlayersIndex;
|
|
|
|
float m_fWalkAngle; //angle between heading and walking direction
|
2019-06-16 22:16:38 +00:00
|
|
|
float m_fFPSMoveHeading;
|
2020-05-15 14:30:25 +00:00
|
|
|
RpAtomic* m_pMinigunTopAtomic; //atomic for the spinning part of the minigun model
|
|
|
|
float m_fGunSpinSpeed; // for minigun
|
|
|
|
float m_fGunSpinAngle;
|
|
|
|
unsigned int m_nPadDownPressedInMilliseconds;
|
2020-08-16 14:10:59 +00:00
|
|
|
unsigned int m_nLastBusFareCollected;
|
2019-06-29 11:38:37 +00:00
|
|
|
|
2019-08-01 22:04:30 +00:00
|
|
|
CPlayerPed();
|
2019-06-30 10:59:55 +00:00
|
|
|
~CPlayerPed();
|
2019-12-26 22:15:27 +00:00
|
|
|
void SetMoveAnim() { };
|
2019-06-30 10:59:55 +00:00
|
|
|
|
2019-06-29 11:38:37 +00:00
|
|
|
void ReApplyMoveAnims(void);
|
2019-08-01 22:04:30 +00:00
|
|
|
void ClearWeaponTarget(void);
|
2019-07-09 16:50:35 +00:00
|
|
|
void SetWantedLevel(int32 level);
|
|
|
|
void SetWantedLevelNoDrop(int32 level);
|
2019-07-11 10:48:49 +00:00
|
|
|
void KeepAreaAroundPlayerClear(void);
|
2019-07-18 02:26:46 +00:00
|
|
|
void AnnoyPlayerPed(bool);
|
2020-05-15 14:30:25 +00:00
|
|
|
void MakeChangesForNewWeapon(int32);
|
|
|
|
void MakeChangesForNewWeapon(eWeaponType);
|
2019-08-01 22:04:30 +00:00
|
|
|
void SetInitialState(void);
|
|
|
|
void ProcessControl(void);
|
2019-09-13 19:04:55 +00:00
|
|
|
void ClearAdrenaline(void);
|
2019-12-26 22:15:27 +00:00
|
|
|
void UseSprintEnergy(void);
|
2019-10-07 21:29:30 +00:00
|
|
|
class CPlayerInfo *GetPlayerInfoForThisPlayerPed();
|
2019-12-26 22:15:27 +00:00
|
|
|
void SetRealMoveAnim(void);
|
2020-01-07 14:23:09 +00:00
|
|
|
void RestoreSprintEnergy(float);
|
|
|
|
bool DoWeaponSmoothSpray(void);
|
|
|
|
void DoStuffToGoOnFire(void);
|
|
|
|
bool DoesTargetHaveToBeBroken(CVector, CWeapon*);
|
|
|
|
void RunningLand(CPad*);
|
|
|
|
bool IsThisPedAttackingPlayer(CPed*);
|
|
|
|
void PlayerControlSniper(CPad*);
|
|
|
|
void PlayerControlM16(CPad*);
|
|
|
|
void PlayerControlFighter(CPad*);
|
|
|
|
void ProcessWeaponSwitch(CPad*);
|
2020-01-03 16:48:13 +00:00
|
|
|
void MakeObjectTargettable(int32);
|
2020-01-23 20:21:50 +00:00
|
|
|
void PlayerControl1stPersonRunAround(CPad *padUsed);
|
|
|
|
void EvaluateNeighbouringTarget(CEntity*, CEntity**, float*, float, float, bool);
|
|
|
|
void EvaluateTarget(CEntity*, CEntity**, float*, float, float, bool);
|
|
|
|
bool FindNextWeaponLockOnTarget(CEntity*, bool);
|
|
|
|
bool FindWeaponLockOnTarget(void);
|
|
|
|
void ProcessAnimGroups(void);
|
|
|
|
void ProcessPlayerWeapon(CPad*);
|
2020-02-12 23:33:21 +00:00
|
|
|
void PlayerControlZelda(CPad*);
|
2020-05-23 15:04:33 +00:00
|
|
|
bool DoesPlayerWantNewWeapon(eWeaponType, bool);
|
2020-05-29 19:05:33 +00:00
|
|
|
void PlayIdleAnimations(CPad*);
|
2020-06-15 20:43:20 +00:00
|
|
|
void RemovePedFromMeleeList(CPed*);
|
2020-07-21 02:59:31 +00:00
|
|
|
void GetMeleeAttackCoords(CVector&, int8, float);
|
|
|
|
int32 FindMeleeAttackPoint(CPed*, CVector&, uint32&);
|
2019-07-09 20:38:05 +00:00
|
|
|
|
|
|
|
static void SetupPlayerPed(int32);
|
|
|
|
static void DeactivatePlayerPed(int32);
|
|
|
|
static void ReactivatePlayerPed(int32);
|
2020-05-02 15:02:17 +00:00
|
|
|
|
|
|
|
#ifdef COMPATIBLE_SAVES
|
|
|
|
virtual void Save(uint8*& buf);
|
|
|
|
virtual void Load(uint8*& buf);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static const uint32 nSaveStructSize;
|
2019-06-02 15:13:56 +00:00
|
|
|
};
|
2019-06-14 23:34:19 +00:00
|
|
|
|
2020-04-23 20:25:18 +00:00
|
|
|
#ifndef PED_SKIN
|
2020-05-10 15:49:33 +00:00
|
|
|
VALIDATE_SIZE(CPlayerPed, 0x5F0);
|
2020-04-23 20:25:18 +00:00
|
|
|
#endif
|