diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-07-26 16:29:28 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-07-26 16:29:28 +0200 |
commit | 4658ebfdc2f5480bc3b43a809d6e747a58799570 (patch) | |
tree | f042ef512e355464a1eb056b3618c562b92a46e5 | |
parent | CAutomobile::FireTruckControl and HydraulicControl (diff) | |
download | re3-4658ebfdc2f5480bc3b43a809d6e747a58799570.tar re3-4658ebfdc2f5480bc3b43a809d6e747a58799570.tar.gz re3-4658ebfdc2f5480bc3b43a809d6e747a58799570.tar.bz2 re3-4658ebfdc2f5480bc3b43a809d6e747a58799570.tar.lz re3-4658ebfdc2f5480bc3b43a809d6e747a58799570.tar.xz re3-4658ebfdc2f5480bc3b43a809d6e747a58799570.tar.zst re3-4658ebfdc2f5480bc3b43a809d6e747a58799570.zip |
-rw-r--r-- | src/core/Wanted.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/Wanted.cpp b/src/core/Wanted.cpp index 7b865311..e4ca0e8c 100644 --- a/src/core/Wanted.cpp +++ b/src/core/Wanted.cpp @@ -40,19 +40,19 @@ CWanted::Initialise() bool CWanted::AreSwatRequired() { - return m_nWantedLevel >= 4; + return m_nWantedLevel == 4 || m_bSwatRequired; } bool CWanted::AreFbiRequired() { - return m_nWantedLevel >= 5; + return m_nWantedLevel == 5 || m_bFbiRequired; } bool CWanted::AreArmyRequired() { - return m_nWantedLevel >= 6; + return m_nWantedLevel == 6 || m_bArmyRequired; } int32 @@ -77,6 +77,8 @@ void CWanted::SetWantedLevel(int32 level) { ClearQdCrimes(); + if (level > MaximumWantedLevel) + level = MaximumWantedLevel; switch (level) { case 0: m_nChaos = 0; @@ -100,8 +102,6 @@ CWanted::SetWantedLevel(int32 level) m_nChaos = 3220; break; default: - if (level > MaximumWantedLevel) - m_nChaos = MaximumWantedLevel; break; } UpdateWantedLevel(); |