Merge pull request #59 from gir489returns/InfiniteAmmo

Added Infinite Ammo and Semi-Godmode.
This commit is contained in:
swordbluesword 2024-01-30 13:26:53 +08:00 committed by GitHub
commit e364495a44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 0 deletions

View File

@ -22,6 +22,7 @@ public:
bool IsInfStamina = false; bool IsInfStamina = false;
bool IsSafe = true; bool IsSafe = true;
bool IsInfinAmmo = false; bool IsInfinAmmo = false;
bool IsGodMode = false;
bool IsToggledFly = false; bool IsToggledFly = false;
bool IsMuteki = false; bool IsMuteki = false;
bool IsMonster = false; bool IsMonster = false;

View File

@ -84,6 +84,10 @@ namespace DX11_Base
ImGui::Checkbox("InfStamina", &Config.IsInfStamina); ImGui::Checkbox("InfStamina", &Config.IsInfStamina);
ImGui::Checkbox("InfAmmo", &Config.IsInfinAmmo);
ImGui::Checkbox("Godmode", &Config.IsGodMode);
if (ImGui::Checkbox("FullBright", &Config.IsFullbright)) if (ImGui::Checkbox("FullBright", &Config.IsFullbright))
SetFullbright(Config.IsFullbright); SetFullbright(Config.IsFullbright);
@ -693,5 +697,21 @@ namespace DX11_Base
// //
// SetDemiGodMode(Config.IsMuteki); // 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));
}
}
} }
} }