From 87d8b843c6303ae30c975eab8786c1a27652d0bb Mon Sep 17 00:00:00 2001 From: Grinch_ Date: Thu, 22 Jul 2021 00:06:42 +0600 Subject: [PATCH] Fix wanted level ui bug --- .gitignore | 6 ++++++ src/Player.cpp | 1 + tools/Release.bat | 4 ++-- tools/premake5.lua | 5 +---- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index b34c63e..336c182 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ .vs/ tools/.vs/ +tools/build/ +tools/obj/ .vs/CheatMenu/v16/.suo .vs/CheatMenu/v16/Browse.VC.db .vs/CheatMenu/v16/Solution.VC.db @@ -28,3 +30,7 @@ tools/.vs/ tools/.vs/CheatMenu/v16/.suo tools/.vs/CheatMenu/v16/Browse.VC.db tools/.vs/CheatMenu/v16/Solution.VC.db +tools/CheatMenu.sln +tools/Depend.vcxproj +tools/CheatMenu.vcxproj +tools/Depend.vcxproj.filters diff --git a/src/Player.cpp b/src/Player.cpp index 603cb2b..0629956 100644 --- a/src/Player.cpp +++ b/src/Player.cpp @@ -331,6 +331,7 @@ void Player::Draw() { int val = pPlayer->m_pPlayerData->m_pWanted->m_nWantedLevel; int max_wl = pPlayer->m_pPlayerData->m_pWanted->MaximumWantedLevel; + max_wl = max_wl < 6 ? 6 : max_wl; ImGui::Columns(3, 0, false); ImGui::Text("Min: 0"); diff --git a/tools/Release.bat b/tools/Release.bat index 3dcef87..28a6891 100644 --- a/tools/Release.bat +++ b/tools/Release.bat @@ -1,4 +1,4 @@ @echo off premake5.exe vs2019 -call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\Common7\Tools\VsDevCmd.bat" -MsBuild CheatMenu.sln /property:Configuration=Release \ No newline at end of file +call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\VsDevCmd.bat" +MsBuild CheatMenu.sln /property:Configuration=Release diff --git a/tools/premake5.lua b/tools/premake5.lua index 6b5a626..24f6399 100644 --- a/tools/premake5.lua +++ b/tools/premake5.lua @@ -24,9 +24,6 @@ workspace "CheatMenu" cppdialect "C++20" characterset "MBCS" staticruntime "On" - flags { - "LinkTimeOptimization" - } project "Depend" kind "StaticLib" @@ -92,7 +89,7 @@ project "CheatMenu" } filter "configurations:Release" - -- optimize "On" + optimize "On" links { "Depend", "d3d9",