summaryrefslogtreecommitdiffstats
path: root/src/core/Wanted.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Wanted.cpp')
-rw-r--r--src/core/Wanted.cpp32
1 files changed, 5 insertions, 27 deletions
diff --git a/src/core/Wanted.cpp b/src/core/Wanted.cpp
index 29294a2b..6f5fdf06 100644
--- a/src/core/Wanted.cpp
+++ b/src/core/Wanted.cpp
@@ -1,5 +1,5 @@
#include "common.h"
-#include "patcher.h"
+
#include "Pools.h"
#include "ModelIndices.h"
#include "Timer.h"
@@ -11,8 +11,8 @@
#include "Wanted.h"
#include "General.h"
-int32 &CWanted::MaximumWantedLevel = *(int32*)0x5F7714; // 6
-int32 &CWanted::nMaximumWantedLevel = *(int32*)0x5F7718; // 6400
+int32 CWanted::MaximumWantedLevel = 6;
+int32 CWanted::nMaximumWantedLevel = 6400;
void
CWanted::Initialise()
@@ -212,7 +212,7 @@ CWanted::ReportCrimeNow(eCrimeType type, const CVector &coors, bool policeDoesnt
else
sensitivity = m_fCrimeSensitivity;
- wantedLevelDrop = min(CCullZones::GetWantedLevelDrop(), 100);
+ wantedLevelDrop = Min(CCullZones::GetWantedLevelDrop(), 100);
chaos = (1.0f - wantedLevelDrop/100.0f) * sensitivity;
if (policeDoesntCare)
@@ -371,7 +371,7 @@ CWanted::Update(void)
CVector playerPos = FindPlayerCoors();
if (WorkOutPolicePresence(playerPos, radius) == 0) {
m_nLastUpdateTime = CTimer::GetTimeInMilliseconds();
- m_nChaos = max(0, m_nChaos - 1);
+ m_nChaos = Max(0, m_nChaos - 1);
UpdateWantedLevel();
}
}
@@ -456,25 +456,3 @@ CWanted::UpdateCrimesQ(void)
}
}
}
-
-STARTPATCHES
- InjectHook(0x4AD6E0, &CWanted::Initialise, PATCH_JUMP);
- InjectHook(0x4AD790, &CWanted::Reset, PATCH_JUMP);
- InjectHook(0x4AD7B0, &CWanted::Update, PATCH_JUMP);
- InjectHook(0x4AD900, &CWanted::UpdateWantedLevel, PATCH_JUMP);
- InjectHook(0x4AD9F0, &CWanted::RegisterCrime, PATCH_JUMP);
- InjectHook(0x4ADA10, &CWanted::RegisterCrime_Immediately, PATCH_JUMP);
- InjectHook(0x4ADA50, &CWanted::SetWantedLevel, PATCH_JUMP);
- InjectHook(0x4ADAC0, &CWanted::SetWantedLevelNoDrop, PATCH_JUMP);
- InjectHook(0x4ADAE0, &CWanted::SetMaximumWantedLevel, PATCH_JUMP);
- InjectHook(0x4ADBA0, &CWanted::AreSwatRequired, PATCH_JUMP);
- InjectHook(0x4ADBC0, &CWanted::AreFbiRequired, PATCH_JUMP);
- InjectHook(0x4ADBE0, &CWanted::AreArmyRequired, PATCH_JUMP);
- InjectHook(0x4ADC00, &CWanted::NumOfHelisRequired, PATCH_JUMP);
- InjectHook(0x4ADC40, &CWanted::ResetPolicePursuit, PATCH_JUMP);
- InjectHook(0x4ADD00, &CWanted::WorkOutPolicePresence, PATCH_JUMP);
- InjectHook(0x4ADF20, &CWanted::ClearQdCrimes, PATCH_JUMP);
- InjectHook(0x4ADFD0, &CWanted::AddCrimeToQ, PATCH_JUMP);
- InjectHook(0x4AE090, &CWanted::UpdateCrimesQ, PATCH_JUMP);
- InjectHook(0x4AE110, &CWanted::ReportCrimeNow, PATCH_JUMP);
-ENDPATCHES