diff options
| author | Garrett Cox <garrettjcox@gmail.com> | 2024-11-24 23:37:48 -0600 |
|---|---|---|
| committer | Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> | 2024-11-25 02:50:49 -0300 |
| commit | 29da9a6ea0ca65dac93b593c04258c0748cc6bae (patch) | |
| tree | fabf66326878d81ae161bf9478fdb65e21adc2e3 | |
| parent | 7d60b7e65de9436ae0b8716dd4ef9f20b8f8cdf2 (diff) | |
Add invicible cheat
| -rw-r--r-- | src/engine/fox_play.c | 4 | ||||
| -rw-r--r-- | src/port/ui/ImguiUI.cpp | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 3e90db13..0ef05370 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -5559,7 +5559,9 @@ void Player_UpdateShields(Player* player) { if (player->damage <= 0) { player->damage = 0; } - player->shields -= 2; + if (!CVarGetInteger("gInvincible", 0)) { + player->shields -= 2; + } if (player->shields <= 0) { player->shields = 0; player->damage = 0; diff --git a/src/port/ui/ImguiUI.cpp b/src/port/ui/ImguiUI.cpp index a9fc6fef..3d8d6c8e 100644 --- a/src/port/ui/ImguiUI.cpp +++ b/src/port/ui/ImguiUI.cpp @@ -460,6 +460,7 @@ void DrawEnhancementsMenu() { void DrawCheatsMenu() { if (UIWidgets::BeginMenu("Cheats")) { UIWidgets::CVarCheckbox("Infinite Lives", "gInfiniteLives"); + UIWidgets::CVarCheckbox("Invincible", "gInvincible"); UIWidgets::CVarCheckbox("Unbreakable Wings", "gUnbreakableWings"); UIWidgets::CVarCheckbox("Infinite Bombs", "gInfiniteBombs"); UIWidgets::CVarCheckbox("Hyper Laser", "gHyperLaser"); |
