Made the ammo cheat work on the laser and charge cannon.

The laser never overheats with infinite ammo, and the charge cannon
fires at full blast immediately.
This commit is contained in:
onpon4 2015-05-20 10:39:30 -04:00
parent 8698125f5f
commit 1c42d07906
1 changed files with 9 additions and 1 deletions

View File

@ -1110,7 +1110,10 @@ static void game_doPlayer()
if (player.ammo[1] < 100) if (player.ammo[1] < 100)
{ {
ship_fireBullet(&player, 1); ship_fireBullet(&player, 1);
if (!engine.cheatAmmo)
player.ammo[1] += 2; player.ammo[1] += 2;
if (player.ammo[1] >= 100) if (player.ammo[1] >= 100)
{ {
player.ammo[1] = 200; player.ammo[1] = 200;
@ -1128,6 +1131,11 @@ static void game_doPlayer()
{ {
if (!player_chargerFired) if (!player_chargerFired)
{ {
// With ammo cheat, cause the charge cannon to
// fire at full blast immediately.
if (engine.cheatAmmo)
player.ammo[1] = 200;
if (currentGame.difficulty == DIFFICULTY_ORIGINAL) if (currentGame.difficulty == DIFFICULTY_ORIGINAL)
{ {
LIMIT_ADD(player.ammo[1], 1, 0, 200); LIMIT_ADD(player.ammo[1], 1, 0, 200);