Merge pull request #9 from iRevolutionDev/update

feat(Police): Fixed wanted level change.
This commit is contained in:
Yimura 2021-12-17 21:52:01 +01:00 committed by GitHub
commit 721682743d

View File

@ -2,15 +2,15 @@
namespace big
{
static int iLastWantedLevel = 0;
void looped::self_police()
{
if (g_local_player == nullptr || g_local_player->m_player_info == nullptr) return;
const auto playerInfo = g_local_player->m_player_info;
if (g.self.never_wanted)
g_local_player->m_player_info->m_wanted_level = 0;
else if (g.self.wanted_level != iLastWantedLevel)
g_local_player->m_player_info->m_wanted_level = g.self.wanted_level;
playerInfo->m_wanted_level = 0;
else if (playerInfo->m_wanted_level != g.self.wanted_level)
playerInfo->m_wanted_level = g.self.wanted_level;
}
}