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:
parent
bad5739c62
commit
744f1977e1
|
@ -320,5 +320,7 @@ int mainGameLoop()
|
|||
rtn = 0;
|
||||
}
|
||||
|
||||
exitPlayer();
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue