Fixed shop bug which caused loss of super charge.

This commit is contained in:
onpon4 2015-04-08 20:33:53 -04:00
parent 5a1954dd24
commit ae15b66e60
1 changed files with 12 additions and 9 deletions

View File

@ -806,6 +806,7 @@ static void sell(int i)
sell(SHOP_PLASMA_MIN_OUTPUT);
currentGame.maxPlasmaOutput--;
if (weapon[W_PLAYER_WEAPON].ammo[0] <= currentGame.maxPlasmaOutput + 1)
weapon[W_PLAYER_WEAPON].ammo[0] = MIN(
weapon[W_PLAYER_WEAPON].ammo[0],
currentGame.maxPlasmaOutput);
@ -822,6 +823,7 @@ static void sell(int i)
sell(SHOP_PLASMA_MIN_DAMAGE);
currentGame.maxPlasmaDamage--;
if (weapon[W_PLAYER_WEAPON].damage <= currentGame.maxPlasmaDamage + 1)
weapon[W_PLAYER_WEAPON].damage = MIN(
weapon[W_PLAYER_WEAPON].damage,
currentGame.maxPlasmaDamage);
@ -838,6 +840,7 @@ static void sell(int i)
sell(SHOP_PLASMA_MIN_RATE);
currentGame.maxPlasmaRate--;
if (weapon[W_PLAYER_WEAPON].reload[0] >= rate2reload[currentGame.maxPlasmaRate + 1])
weapon[W_PLAYER_WEAPON].reload[0] = MAX(
weapon[W_PLAYER_WEAPON].reload[0],
rate2reload[currentGame.maxPlasmaRate]);