Fixed shop bug which caused loss of super charge.
This commit is contained in:
parent
5a1954dd24
commit
ae15b66e60
21
src/shop.cpp
21
src/shop.cpp
|
@ -806,9 +806,10 @@ static void sell(int i)
|
||||||
sell(SHOP_PLASMA_MIN_OUTPUT);
|
sell(SHOP_PLASMA_MIN_OUTPUT);
|
||||||
|
|
||||||
currentGame.maxPlasmaOutput--;
|
currentGame.maxPlasmaOutput--;
|
||||||
weapon[W_PLAYER_WEAPON].ammo[0] = MIN(
|
if (weapon[W_PLAYER_WEAPON].ammo[0] <= currentGame.maxPlasmaOutput + 1)
|
||||||
weapon[W_PLAYER_WEAPON].ammo[0],
|
weapon[W_PLAYER_WEAPON].ammo[0] = MIN(
|
||||||
currentGame.maxPlasmaOutput);
|
weapon[W_PLAYER_WEAPON].ammo[0],
|
||||||
|
currentGame.maxPlasmaOutput);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHOP_PLASMA_MAX_DAMAGE:
|
case SHOP_PLASMA_MAX_DAMAGE:
|
||||||
|
@ -822,9 +823,10 @@ static void sell(int i)
|
||||||
sell(SHOP_PLASMA_MIN_DAMAGE);
|
sell(SHOP_PLASMA_MIN_DAMAGE);
|
||||||
|
|
||||||
currentGame.maxPlasmaDamage--;
|
currentGame.maxPlasmaDamage--;
|
||||||
weapon[W_PLAYER_WEAPON].damage = MIN(
|
if (weapon[W_PLAYER_WEAPON].damage <= currentGame.maxPlasmaDamage + 1)
|
||||||
weapon[W_PLAYER_WEAPON].damage,
|
weapon[W_PLAYER_WEAPON].damage = MIN(
|
||||||
currentGame.maxPlasmaDamage);
|
weapon[W_PLAYER_WEAPON].damage,
|
||||||
|
currentGame.maxPlasmaDamage);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHOP_PLASMA_MAX_RATE:
|
case SHOP_PLASMA_MAX_RATE:
|
||||||
|
@ -838,9 +840,10 @@ static void sell(int i)
|
||||||
sell(SHOP_PLASMA_MIN_RATE);
|
sell(SHOP_PLASMA_MIN_RATE);
|
||||||
|
|
||||||
currentGame.maxPlasmaRate--;
|
currentGame.maxPlasmaRate--;
|
||||||
weapon[W_PLAYER_WEAPON].reload[0] = MAX(
|
if (weapon[W_PLAYER_WEAPON].reload[0] >= rate2reload[currentGame.maxPlasmaRate + 1])
|
||||||
weapon[W_PLAYER_WEAPON].reload[0],
|
weapon[W_PLAYER_WEAPON].reload[0] = MAX(
|
||||||
rate2reload[currentGame.maxPlasmaRate]);
|
weapon[W_PLAYER_WEAPON].reload[0],
|
||||||
|
rate2reload[currentGame.maxPlasmaRate]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHOP_PLASMA_MIN_OUTPUT:
|
case SHOP_PLASMA_MIN_OUTPUT:
|
||||||
|
|
Loading…
Reference in New Issue