Reset charge cannon charge and laser heat after each mission.

This prevents these variables from turning into a huge amount of missiles when
buying a missile launcher in the shop.

This fixes Debian bug #286933.
This commit is contained in:
Guus Sliepen 2011-08-29 09:10:50 +02:00
parent bad5739c62
commit 744f1977e1
3 changed files with 13 additions and 1 deletions

View File

@ -320,5 +320,7 @@ int mainGameLoop()
rtn = 0;
}
exitPlayer();
return rtn;
}

View File

@ -65,7 +65,16 @@ void initPlayer()
player.ammo[1] = 0;
if (player.weaponType[1] == W_LASER)
player.ammo[1] = 1;
player.ammo[1] = 0;
}
void exitPlayer()
{
if (player.weaponType[1] == W_CHARGER)
player.ammo[1] = 0;
if (player.weaponType[1] == W_LASER)
player.ammo[1] = 0;
}
void doPlayer()

View File

@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern object player;
extern void initPlayer();
extern void exitPlayer();
extern void doPlayer();
extern void flushInput();
extern void getPlayerInput();