summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeusVexus <10972000+DeusVexus@users.noreply.github.com>2022-11-22 00:18:23 -0800
committerGitHub <noreply@github.com>2022-11-22 09:18:23 +0100
commit1ae4e2c1f7098aaf1e121e1fcf5c46a2b89ee2f5 (patch)
treee4cf8aed7e9fc0c89c6ded82cf024a144183d6c7
parentc569a469333bdecfec9da6a6b5633701f07b4b78 (diff)
[Enhancement] Include minigame ammo in infinite ammo cheat (#1973)
-rw-r--r--soh/src/overlays/actors/ovl_player_actor/z_player.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c
index 7f9ebb4ca..c4c546590 100644
--- a/soh/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c
@@ -1874,7 +1874,9 @@ void func_808337D4(PlayState* play, Player* this) {
this->actor.shape.rot.y, 0, 0);
if (spawnedActor != NULL) {
if ((explosiveType != 0) && (play->bombchuBowlingStatus != 0)) {
- play->bombchuBowlingStatus--;
+ if (!CVar_GetS32("gInfiniteAmmo", 0)) {
+ play->bombchuBowlingStatus--;
+ }
if (play->bombchuBowlingStatus == 0) {
play->bombchuBowlingStatus = -1;
}
@@ -2515,9 +2517,13 @@ s32 func_808350A4(PlayState* play, Player* this) {
func_80834380(play, this, &item, &arrowType);
if (gSaveContext.minigameState == 1) {
- play->interfaceCtx.hbaAmmo--;
+ if (!CVar_GetS32("gInfiniteAmmo", 0)) {
+ play->interfaceCtx.hbaAmmo--;
+ }
} else if (play->shootingGalleryStatus != 0) {
- play->shootingGalleryStatus--;
+ if (!CVar_GetS32("gInfiniteAmmo", 0)) {
+ play->shootingGalleryStatus--;
+ }
} else {
Inventory_ChangeAmmo(item, -1);
}