feat(Police): Fixed wanted level change.

This commit is contained in:
iRevolutionDev 2021-12-17 17:44:09 -03:00
parent 12bd47576a
commit 265e905d3f

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;
}
}