diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2019-08-02 22:23:05 +0200 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2019-08-02 22:23:05 +0200 |
commit | 73e2a4b035e19ace0ad5c55c58a15ee1d8265fee (patch) | |
tree | eafd98b48c650c84139804ca89259ae61e00e3ea /src/core/Wanted.cpp | |
parent | fix (diff) | |
parent | restore original shadows fading (diff) | |
download | re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.gz re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.bz2 re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.lz re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.xz re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.zst re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.zip |
Diffstat (limited to 'src/core/Wanted.cpp')
-rw-r--r-- | src/core/Wanted.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/core/Wanted.cpp b/src/core/Wanted.cpp index 7b865311..26b115e3 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(); @@ -275,6 +275,9 @@ CWanted::UpdateWantedLevel() { int32 CurrWantedLevel = m_nWantedLevel; + if (m_nChaos > nMaximumWantedLevel) + m_nChaos = nMaximumWantedLevel; + if (m_nChaos >= 0 && m_nChaos < 40) { m_nWantedLevel = 0; m_MaximumLawEnforcerVehicles = 0; |