1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-04 21:25:55 +00:00

Merge pull request #57 from gennariarmando/master

Update Wanted.cpp
This commit is contained in:
aap 2019-06-27 09:45:59 +02:00 committed by GitHub
commit f6443ea108
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 117 additions and 67 deletions

View file

@ -182,5 +182,5 @@ but here are some observations:
Here you can find a list of variables that you might need to set in windows: Here you can find a list of variables that you might need to set in windows:
``` ```
"GTA_III_RE_DIR" * path to "gta3_re" game folder usually where this plugin run. "GTA_III_RE_DIR" * path to "gta3_re" game folder usually where this plugin run.
"GTA_III_DIR)" * path to "GTAIII" game folder. "GTA_III_DIR" * path to "GTAIII" game folder.
``` ```

View file

@ -1,3 +1,36 @@
#include "common.h" #include "common.h"
#include "patcher.h" #include "patcher.h"
#include "Wanted.h" #include "Wanted.h"
bool CWanted::AreSwatRequired()
{
return m_nWantedLevel >= 4;
}
bool CWanted::AreFbiRequired()
{
return m_nWantedLevel >= 5;
}
bool CWanted::AreArmyRequired()
{
return m_nWantedLevel >= 6;
}
int CWanted::NumOfHelisRequired()
{
if (m_IsIgnoredByCops)
return 0;
// Return value is number of helicopters, no need to name them.
switch (m_nWantedLevel) {
case WANTEDLEVEL_3:
case WANTEDLEVEL_4:
return 1;
case WANTEDLEVEL_5:
case WANTEDLEVEL_6:
return 2;
default:
return 0;
};
}

View file

@ -1,70 +1,20 @@
#pragma once #pragma once
#include "Entity.h" #include "Entity.h"
#include "math/Vector.h" #include "math/Vector.h"
#include "CopPed.h"
enum eCrimeType enum eWantedLevel {
NOTWANTED,
WANTEDLEVEL_1,
WANTEDLEVEL_2,
WANTEDLEVEL_3,
WANTEDLEVEL_4,
WANTEDLEVEL_5,
WANTEDLEVEL_6,
};
class CWanted
{ {
CRIME_NONE,
CRIME_SHOT_FIRED,
CRIME_PED_FIGHT,
CRIME_COP_FIGHT,
CRIME_DAMAGED_PED,
CRIME_DAMAGED_COP,
CRIME_CAR_THEFT,
CRIME_CRIME7,
CRIME_COP_EVASIVE_DIVE,
CRIME_COP_EVASIVE_DIVE2,
CRIME_PED_RUN_OVER,
CRIME_COP_RUN_OVER,
CRIME_DESTROYED_HELI,
CRIME_PED_BURNED,
CRIME_COP_BURNED,
CRIME_VEHICLE_BURNED,
CRIME_DESTROYED_CESSNA,
};
enum eCopType
{
COP_STREET = 0,
COP_FBI = 1,
COP_SWAT = 2,
COP_ARMY = 3,
};
class CCrime {
public:
eCrimeType m_eCrimeType;
CEntity *m_pVictim;
int32 m_nCrimeTime;
CVector m_vecCrimePos;
int8 m_bReported;
int8 m_bMultiplier;
int8 pad_20[2];
};
class CCopPed {
public:
int16 m_wRoadblockNode;
int8 field_1342;
int8 field_1343;
float m_fDistanceToTarget;
int8 m_bIsInPursuit;
int8 m_bIsDisabledCop;
int8 field_1350;
int8 field_1351;
int8 m_bZoneDisabledButClose;
int8 m_bZoneDisabled;
int8 field_1354;
int8 field_1355;
int32 field_1356;
eCopType m_nCopType;
int8 field_1364;
int8 field_1365;
int8 field_1366;
int8 field_1367;
};
class CWanted {
public: public:
int32 m_nChaos; int32 m_nChaos;
int32 m_nLastUpdateTime; int32 m_nLastUpdateTime;
@ -75,11 +25,21 @@ public:
uint8 m_bMaximumLawEnforcerVehicles; uint8 m_bMaximumLawEnforcerVehicles;
int8 field_19; int8 field_19;
int16 m_wRoadblockDensity; int16 m_wRoadblockDensity;
uint8 m_bFlags; uint8 m_IsIgnoredByCops : 1;
uint8 m_IsIgnoredByEveryOne : 1;
uint8 m_IsSwatRequired : 1;
uint8 m_IsFbiRequired : 1;
uint8 m_IdArmyRequired : 1;
int8 field_23; int8 field_23;
int32 m_nWantedLevel; int32 m_nWantedLevel;
CCrime m_sCrimes[16]; CCrime m_sCrimes[16];
CCopPed *m_pCops[10]; CCopPed *m_pCops[10];
public:
bool AreSwatRequired();
bool AreFbiRequired();
bool AreArmyRequired();
int NumOfHelisRequired();
}; };
static_assert(sizeof(CWanted) == 0x204, "CWanted: error"); static_assert(sizeof(CWanted) == 0x204, "CWanted: error");

View file

@ -1,11 +1,68 @@
#pragma once #pragma once
#include "Ped.h" #include "Ped.h"
enum eCrimeType
{
CRIME_NONE,
CRIME_SHOT_FIRED,
CRIME_PED_FIGHT,
CRIME_COP_FIGHT,
CRIME_DAMAGED_PED,
CRIME_DAMAGED_COP,
CRIME_CAR_THEFT,
CRIME_CRIME7,
CRIME_COP_EVASIVE_DIVE,
CRIME_COP_EVASIVE_DIVE2,
CRIME_PED_RUN_OVER,
CRIME_COP_RUN_OVER,
CRIME_DESTROYED_HELI,
CRIME_PED_BURNED,
CRIME_COP_BURNED,
CRIME_VEHICLE_BURNED,
CRIME_DESTROYED_CESSNA,
};
enum eCopType
{
COP_STREET = 0,
COP_FBI = 1,
COP_SWAT = 2,
COP_ARMY = 3,
};
class CCrime
{
public:
eCrimeType m_eCrimeType;
CEntity *m_pVictim;
int32 m_nCrimeTime;
CVector m_vecCrimePos;
int8 m_bReported;
int8 m_bMultiplier;
int8 pad_20[2];
};
class CCopPed : public CPed class CCopPed : public CPed
{ {
public: public:
// 0x53C int16 m_wRoadblockNode;
uint8 stuff[28]; int8 field_1342;
int8 field_1343;
float m_fDistanceToTarget;
int8 m_bIsInPursuit;
int8 m_bIsDisabledCop;
int8 field_1350;
int8 field_1351;
int8 m_bZoneDisabledButClose;
int8 m_bZoneDisabled;
int8 field_1354;
int8 field_1355;
int32 field_1356;
eCopType m_nCopType;
int8 field_1364;
int8 field_1365;
int8 field_1366;
int8 field_1367;
}; };
static_assert(sizeof(CCopPed) == 0x558, "CCopPed: error"); static_assert(sizeof(CCopPed) == 0x558, "CCopPed: error");