summaryrefslogtreecommitdiffstats
path: root/src/core/Wanted.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-12 18:01:22 +0200
committeraap <aap@papnet.eu>2019-07-12 18:01:22 +0200
commit60711154baf5477d6f4c12add1ecdd0a24c0c116 (patch)
tree460199051422d03a6a70a1e57f9c8d2d588c85b6 /src/core/Wanted.h
parentCAutomobile::ProcessControlInputs (diff)
downloadre3-60711154baf5477d6f4c12add1ecdd0a24c0c116.tar
re3-60711154baf5477d6f4c12add1ecdd0a24c0c116.tar.gz
re3-60711154baf5477d6f4c12add1ecdd0a24c0c116.tar.bz2
re3-60711154baf5477d6f4c12add1ecdd0a24c0c116.tar.lz
re3-60711154baf5477d6f4c12add1ecdd0a24c0c116.tar.xz
re3-60711154baf5477d6f4c12add1ecdd0a24c0c116.tar.zst
re3-60711154baf5477d6f4c12add1ecdd0a24c0c116.zip
Diffstat (limited to 'src/core/Wanted.h')
-rw-r--r--src/core/Wanted.h73
1 files changed, 52 insertions, 21 deletions
diff --git a/src/core/Wanted.h b/src/core/Wanted.h
index d3f6638b..1a72f839 100644
--- a/src/core/Wanted.h
+++ b/src/core/Wanted.h
@@ -1,16 +1,38 @@
#pragma once
-#include "Entity.h"
-#include "math/Vector.h"
-#include "CopPed.h"
-
-enum eWantedLevel {
- NOTWANTED,
- WANTEDLEVEL_1,
- WANTEDLEVEL_2,
- WANTEDLEVEL_3,
- WANTEDLEVEL_4,
- WANTEDLEVEL_5,
- WANTEDLEVEL_6,
+
+class CEntity;
+class CCopPed;
+
+enum eCrimeType
+{
+ CRIME_NONE,
+ CRIME_POSSESSION_GUN,
+ CRIME_HIT_PED,
+ CRIME_HIT_COP,
+ CRIME_SHOOT_PED,
+ CRIME_SHOOT_COP,
+ CRIME_STEAL_CAR,
+ CRIME_RUN_REDLIGHT,
+ CRIME_RECKLESS_DRIVING,
+ CRIME_SPEEDING,
+ CRIME_RUNOVER_PED,
+ CRIME_RUNOVER_COP,
+ CRIME_SHOOT_HELI,
+ CRIME_PED_BURNED,
+ CRIME_COP_BURNED,
+ CRIME_VEHICLE_BURNED,
+ CRIME_DESTROYED_CESSNA,
+};
+
+class CCrimeBeingQd
+{
+public:
+ eCrimeType m_nType;
+ uint32 m_nId;
+ int32 m_nTime;
+ CVector m_vecPosn;
+ bool m_bReported;
+ bool m_bPoliceDoesntCare;
};
class CWanted
@@ -23,28 +45,37 @@ public:
uint8 m_CurrentCops;
uint8 m_MaxCops;
uint8 m_MaximumLawEnforcerVehicles;
- int8 field_19;
+ uint8 m_CopsBeatingSuspect;
int16 m_RoadblockDensity;
- uint8 m_IsIgnoredByCops : 1;
- uint8 m_IsIgnoredByEveryOne : 1;
- uint8 m_IsSwatRequired : 1;
- uint8 m_IsFbiRequired : 1;
- uint8 m_IdArmyRequired : 1;
- int8 field_23;
+ uint8 m_bIgnoredByCops : 1;
+ uint8 m_bIgnoredByEveryone : 1;
+ uint8 m_bSwatRequired : 1;
+ uint8 m_bFbiRequired : 1;
+ uint8 m_bArmyRequired : 1;
int32 m_nWantedLevel;
- CCrime m_sCrimes[16];
+ CCrimeBeingQd m_aCrimes[16];
CCopPed *m_pCops[10];
+
static int32 &MaximumWantedLevel;
+ static int32 &nMaximumWantedLevel;
public:
+ void Initialise();
bool AreSwatRequired();
bool AreFbiRequired();
bool AreArmyRequired();
- int NumOfHelisRequired();
+ int32 NumOfHelisRequired();
void SetWantedLevel(int32);
void SetWantedLevelNoDrop(int32 level);
+ void RegisterCrime(eCrimeType type, const CVector &coors, uint32 id, bool policeDoesntCare);
+ void RegisterCrime_Immediately(eCrimeType type, const CVector &coors, uint32 id, bool policeDoesntCare);
void ClearQdCrimes();
+ bool AddCrimeToQ(eCrimeType type, int32 id, const CVector &pos, bool reported, bool policeDoesntCare);
+ void ReportCrimeNow(eCrimeType type, const CVector &coors, bool policeDoesntCare);
void UpdateWantedLevel();
+
+ static int32 WorkOutPolicePresence(CVector posn, float radius);
+ static void SetMaximumWantedLevel(int32 level);
};
static_assert(sizeof(CWanted) == 0x204, "CWanted: error");