From b555f4449d7ea5e837bc0fc0a3a34fce66671f3b Mon Sep 17 00:00:00 2001 From: Grinch_ Date: Sun, 31 Jul 2022 04:01:41 +0600 Subject: [PATCH] [III | VC] Fix build issues --- src/overlay.cpp | 4 ++++ src/overlay.h | 2 ++ src/player.cpp | 2 +- tools/premake5.lua | 10 ++++++++-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/overlay.cpp b/src/overlay.cpp index 73d1d03..fef9fa7 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -126,6 +126,7 @@ void Overlay::ProcessModelInfo() } } +#ifdef GTASA void Overlay::ProcessPedTasks() { if (m_bPedTasks) @@ -174,6 +175,7 @@ void Overlay::ProcessPedTasks() } } } +#endif void Overlay::Draw() { @@ -191,7 +193,9 @@ void Overlay::Draw() if (ImGui::Begin("##Overlay", NULL, flags)) { ProcessModelInfo(); +#ifdef GTASA ProcessPedTasks(); +#endif ImGui::End(); } diff --git a/src/overlay.h b/src/overlay.h index 8e2148c..c7b40fc 100644 --- a/src/overlay.h +++ b/src/overlay.h @@ -27,8 +27,10 @@ private: // Draws model & it's name on screen (peds, objects, vehicles) static void ProcessModelInfo(); +#ifdef GTASA // Processes current ped tasks & draws them ons creen static void ProcessPedTasks(); +#endif // Processes commad bar & commands static void ProcessCmdBar(); diff --git a/src/player.cpp b/src/player.cpp index bfa6f6d..f4f1d3b 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -150,7 +150,7 @@ void Player::Init() static float prevVal = 0; float curVal = player->m_fHealth; - if (player->m_fHealth >= player->m_fMaxHealth) + if (player->m_fHealth >= BY_GAME(player->m_fMaxHealth, 100, 100)) { curVal = player->m_fArmour; } diff --git a/tools/premake5.lua b/tools/premake5.lua index 527e9be..0033049 100644 --- a/tools/premake5.lua +++ b/tools/premake5.lua @@ -111,7 +111,10 @@ project "CheatMenuIII" "../src/locale.h", "../src/locale.cpp", "../src/rpc.h", - "../src/rpc.cpp" + "../src/rpc.cpp", + "../src/overlay.h", + "../src/overlay.cpp", + "../src/tasknames.cpp" } includedirs { PSDK_DIR .. "/plugin_III/", @@ -202,7 +205,10 @@ project "CheatMenuVC" "../src/locale.h", "../src/locale.cpp", "../src/rpc.h", - "../src/rpc.cpp" + "../src/rpc.cpp", + "../src/overlay.h", + "../src/overlay.cpp", + "../src/tasknames.cpp" } includedirs { PSDK_DIR .. "/plugin_vc/",