From f7aab48a564a7189d4f2d42dae41e0782c247db7 Mon Sep 17 00:00:00 2001 From: onpon4 Date: Thu, 7 Jan 2016 05:36:49 -0500 Subject: [PATCH] Revert "Added usage of plasma ammo by the charger cannon." This reverts commit 05e645aeffd9fe753709a2586a15738f204fc423. --- src/game.cpp | 25 +++++-------------------- src/player.cpp | 2 -- src/player.h | 1 - 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 306a5c2..28d3480 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1209,10 +1209,7 @@ static void game_doPlayer() // With ammo cheat, cause the charge cannon to // fire at full blast immediately. if (engine.cheatAmmo) - { - player_chargerAlloc = 200; player.ammo[1] = 200; - } if (game.difficulty == DIFFICULTY_ORIGINAL) { @@ -1220,23 +1217,12 @@ static void game_doPlayer() } else { - player.ammo[1] += 1; - if (player.ammo[1] > player_chargerAlloc) + LIMIT_ADD(player.ammo[1], 1, 0, 150); + if (player.ammo[1] >= 150) { - if ((player_chargerAlloc < 150) && - (player.ammo[0] > 0)) - { - player.ammo[0] -= 1; - player_chargerAlloc += 30; - } - else - { - player.ammo[1] = player_chargerAlloc; - ship_fireBullet(&player, 1); - player_chargerAlloc = 0; - player.ammo[1] = 0; - player_chargerFired = true; - } + ship_fireBullet(&player, 1); + player.ammo[1] = 0; + player_chargerFired = true; } } } @@ -1245,7 +1231,6 @@ static void game_doPlayer() { if (player.ammo[1] > 0) ship_fireBullet(&player, 1); - player_chargerAlloc = 0; player.ammo[1] = 0; player_chargerFired = false; } diff --git a/src/player.cpp b/src/player.cpp index 26a30c4..9a24e96 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -20,7 +20,6 @@ along with this program. If not, see . #include "Starfighter.h" object player; -int player_chargerAlloc = 0; bool player_chargerFired = false; /* @@ -96,7 +95,6 @@ void player_checkShockDamage(float x, float y) void exitPlayer() { - player_chargerAlloc = 0; player_chargerFired = false; if ((player.weaponType[1] == W_CHARGER) || (player.weaponType[1] == W_LASER)) diff --git a/src/player.h b/src/player.h index 0dae91f..9e3e388 100644 --- a/src/player.h +++ b/src/player.h @@ -21,7 +21,6 @@ along with this program. If not, see . #define PLAYER_H extern object player; -extern int player_chargerAlloc; extern bool player_chargerFired; extern void initPlayer();