Merge pull request #947 from withmorten/miami

fix CPed struct, GetWantedLevel
This commit is contained in:
aap 2021-01-11 22:46:06 +01:00 committed by GitHub
commit afcb794d59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View File

@ -41,6 +41,7 @@ public:
int32 NumOfHelisRequired(); int32 NumOfHelisRequired();
void SetWantedLevel(int32); void SetWantedLevel(int32);
void SetWantedLevelNoDrop(int32 level); void SetWantedLevelNoDrop(int32 level);
int32 GetWantedLevel() { return m_nWantedLevel; }
void CheatWantedLevel(int32 level); void CheatWantedLevel(int32 level);
void RegisterCrime(eCrimeType type, const CVector &coors, uint32 id, bool policeDoesntCare); void RegisterCrime(eCrimeType type, const CVector &coors, uint32 id, bool policeDoesntCare);
void RegisterCrime_Immediately(eCrimeType type, const CVector &coors, uint32 id, bool policeDoesntCare); void RegisterCrime_Immediately(eCrimeType type, const CVector &coors, uint32 id, bool policeDoesntCare);

View File

@ -492,10 +492,15 @@ public:
uint32 bDonePositionOutOfCollision : 1; uint32 bDonePositionOutOfCollision : 1;
uint32 bCanAttackPlayerWithCops : 1; uint32 bCanAttackPlayerWithCops : 1;
#ifdef KANGAROO_CHEAT
// our own flags // our own flags
uint32 m_ped_flagI80 : 1; // KANGAROO_CHEAT define makes use of this as cheat toggle uint32 m_ped_flagI80 : 1; // KANGAROO_CHEAT define makes use of this as cheat toggle
#endif
uint8 m_gangFlags; uint8 m_gangFlags;
uint8 m_unused15D; // these 3 can't be padding but had to actually have been members ...
uint8 m_unused15E;
uint8 m_unused15F;
uint8 CharCreatedBy; uint8 CharCreatedBy;
eObjective m_objective; eObjective m_objective;
eObjective m_prevObjective; eObjective m_prevObjective;
@ -536,7 +541,7 @@ public:
uint32 m_pathNodeTimer; uint32 m_pathNodeTimer;
CPathNode m_pathNodeObjPool[8]; CPathNode m_pathNodeObjPool[8];
CPathNode* m_pCurPathNode; CPathNode* m_pCurPathNode;
char m_nPathDir; int8 m_nPathDir;
CPathNode* m_pLastPathNode; CPathNode* m_pLastPathNode;
CPathNode* m_pNextPathNode; CPathNode* m_pNextPathNode;
CVector m_followPathDestPos; CVector m_followPathDestPos;

View File

@ -288,7 +288,7 @@ CAutomobile::ProcessControl(void)
// Improve grip of vehicles in certain cases // Improve grip of vehicles in certain cases
bool strongGrip1 = false; bool strongGrip1 = false;
bool strongGrip2 = false; bool strongGrip2 = false;
if(FindPlayerVehicle() && this != FindPlayerVehicle() && FindPlayerPed()->m_pWanted->m_nWantedLevel > 3 && if(FindPlayerVehicle() && this != FindPlayerVehicle() && FindPlayerPed()->m_pWanted->GetWantedLevel() > 3 &&
(AutoPilot.m_nCarMission == MISSION_RAMPLAYER_FARAWAY || AutoPilot.m_nCarMission == MISSION_RAMPLAYER_CLOSE || (AutoPilot.m_nCarMission == MISSION_RAMPLAYER_FARAWAY || AutoPilot.m_nCarMission == MISSION_RAMPLAYER_CLOSE ||
AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_FARAWAY || AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_CLOSE) && AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_FARAWAY || AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_CLOSE) &&
FindPlayerSpeed().Magnitude() > 0.3f){ FindPlayerSpeed().Magnitude() > 0.3f){