From 745598de5f9ccdb79b9a6022ffefb03e3a9d7380 Mon Sep 17 00:00:00 2001 From: NightFyre <80198020+xCENTx@users.noreply.github.com> Date: Tue, 30 Jan 2024 08:08:17 -0500 Subject: [PATCH] Update Menu.cpp functions already existed --- src/Menu.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/Menu.cpp b/src/Menu.cpp index 20e5ed4..5e4a0cb 100644 --- a/src/Menu.cpp +++ b/src/Menu.cpp @@ -72,7 +72,8 @@ namespace DX11_Base ImGui::Checkbox("InfStamina", &Config.IsInfStamina); - ImGui::Checkbox("InfAmmo", &Config.IsInfinAmmo); + if (ImGui::Checkbox("InfAmmo", &Config.IsInfinAmmo)) + SetInfiniteAmmo(Config.IsInfinAmmo); ImGui::Checkbox("Godmode", &Config.IsGodMode); @@ -785,20 +786,7 @@ namespace DX11_Base // // SetDemiGodMode(Config.IsMuteki); - if (Config.GetPalPlayerCharacter() != NULL) - { - if (Config.GetPalPlayerCharacter()->ShooterComponent != NULL && Config.GetPalPlayerCharacter()->ShooterComponent->GetHasWeapon() != NULL && Config.GetPalPlayerCharacter()->ShooterComponent->CanShoot()) - { - Config.GetPalPlayerCharacter()->ShooterComponent->GetHasWeapon()->IsRequiredBullet = !Config.IsInfinAmmo; - } - } if (Config.IsGodMode) - { - if (Config.GetPalPlayerCharacter() && Config.GetPalPlayerCharacter()->CharacterParameterComponent && Config.GetPalPlayerCharacter()->CharacterParameterComponent->IndividualParameter) - { - if (Config.GetPalPlayerCharacter()->CharacterParameterComponent->IndividualParameter->GetHP().Value < INT_MAX) - Config.GetPalPlayerCharacter()->ReviveCharacter_ToServer(SDK::FFixedPoint(INT_MAX)); - } - } + ReviveLocalPlayer(); } } \ No newline at end of file