fix(Self): Wanted Level added force toggle

fixes #23
This commit is contained in:
Yimura 2022-01-05 18:30:16 +01:00
parent b5623cdd19
commit 5778984b18
No known key found for this signature in database
GPG Key ID: 3D8FF4397E768682
3 changed files with 6 additions and 3 deletions

View File

@ -6,11 +6,11 @@ namespace big
{
if (g_local_player == nullptr || g_local_player->m_player_info == nullptr) return;
const auto playerInfo = g_local_player->m_player_info;
auto playerInfo = g_local_player->m_player_info;
if (g.self.never_wanted)
playerInfo->m_wanted_level = 0;
else if (playerInfo->m_wanted_level != g.self.wanted_level)
else if (g.self.force_wanted_level)
playerInfo->m_wanted_level = g.self.wanted_level;
}
}

View File

@ -60,6 +60,7 @@ struct globals {
bool noclip = false;
bool no_ragdoll = false;
bool super_run = false;
bool force_wanted_level = false;
int wanted_level = 0;
frame_flags frame_flags{};

View File

@ -107,8 +107,10 @@ namespace big
if (!g.self.never_wanted)
{
ImGui::Checkbox("Force Wanted Level", &g.self.force_wanted_level);
ImGui::Text("Wanted Level");
ImGui::SliderInt("###wanted_level", &g.self.wanted_level, 0, 5);
if (ImGui::SliderInt("###wanted_level", &g.self.wanted_level, 0, 5) && !g.self.force_wanted_level)
g_local_player->m_player_info->m_wanted_level = g.self.wanted_level;
}
ImGui::TreePop();