Revert "Added usage of plasma ammo by the charger cannon."

This reverts commit 05e645aeff.
This commit is contained in:
onpon4 2016-01-07 05:36:49 -05:00
parent e405b6eb0f
commit f7aab48a56
3 changed files with 5 additions and 23 deletions

View File

@ -1209,10 +1209,7 @@ static void game_doPlayer()
// With ammo cheat, cause the charge cannon to // With ammo cheat, cause the charge cannon to
// fire at full blast immediately. // fire at full blast immediately.
if (engine.cheatAmmo) if (engine.cheatAmmo)
{
player_chargerAlloc = 200;
player.ammo[1] = 200; player.ammo[1] = 200;
}
if (game.difficulty == DIFFICULTY_ORIGINAL) if (game.difficulty == DIFFICULTY_ORIGINAL)
{ {
@ -1220,23 +1217,12 @@ static void game_doPlayer()
} }
else else
{ {
player.ammo[1] += 1; LIMIT_ADD(player.ammo[1], 1, 0, 150);
if (player.ammo[1] > player_chargerAlloc) if (player.ammo[1] >= 150)
{ {
if ((player_chargerAlloc < 150) && ship_fireBullet(&player, 1);
(player.ammo[0] > 0)) player.ammo[1] = 0;
{ player_chargerFired = true;
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;
}
} }
} }
} }
@ -1245,7 +1231,6 @@ static void game_doPlayer()
{ {
if (player.ammo[1] > 0) if (player.ammo[1] > 0)
ship_fireBullet(&player, 1); ship_fireBullet(&player, 1);
player_chargerAlloc = 0;
player.ammo[1] = 0; player.ammo[1] = 0;
player_chargerFired = false; player_chargerFired = false;
} }

View File

@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "Starfighter.h" #include "Starfighter.h"
object player; object player;
int player_chargerAlloc = 0;
bool player_chargerFired = false; bool player_chargerFired = false;
/* /*
@ -96,7 +95,6 @@ void player_checkShockDamage(float x, float y)
void exitPlayer() void exitPlayer()
{ {
player_chargerAlloc = 0;
player_chargerFired = false; player_chargerFired = false;
if ((player.weaponType[1] == W_CHARGER) || (player.weaponType[1] == W_LASER)) if ((player.weaponType[1] == W_CHARGER) || (player.weaponType[1] == W_LASER))

View File

@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PLAYER_H #define PLAYER_H
extern object player; extern object player;
extern int player_chargerAlloc;
extern bool player_chargerFired; extern bool player_chargerFired;
extern void initPlayer(); extern void initPlayer();