Skip to content

Commit

Permalink
Check for infiniteammo CCMD in A_ConsumeAmmo()
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Dec 13, 2024
1 parent d2c20d3 commit 749392b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/p_pspr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,8 @@ void A_ConsumeAmmo(mobj_t *actor, player_t *player, pspdef_t *psp)
}

// subtract ammo, but don't let it get below zero
player->ammo[type] = MAX(0, player->ammo[type] - ammo);
if (!infiniteammo)
player->ammo[type] = MAX(0, player->ammo[type] - ammo);
}

//
Expand Down

0 comments on commit 749392b

Please sign in to comment.