Play denied sound when attempting to boost / use ecm when depleted.
This commit is contained in:
parent
7656957dd6
commit
26aa3b3bb1
|
@ -145,11 +145,18 @@ static void handleKeyboard(void)
|
||||||
{
|
{
|
||||||
if (battle.status == MS_IN_PROGRESS)
|
if (battle.status == MS_IN_PROGRESS)
|
||||||
{
|
{
|
||||||
if (app.keyboard[SDL_SCANCODE_W] && battle.boostTimer == BOOST_RECHARGE_TIME)
|
if (app.keyboard[SDL_SCANCODE_W])
|
||||||
|
{
|
||||||
|
if (battle.boostTimer == BOOST_RECHARGE_TIME)
|
||||||
{
|
{
|
||||||
playSound(SND_BOOST);
|
playSound(SND_BOOST);
|
||||||
|
|
||||||
activateBoost();
|
activateBoost();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
playSound(SND_GUI_DENIED);
|
||||||
|
}
|
||||||
|
|
||||||
app.keyboard[SDL_SCANCODE_W] = 0;
|
app.keyboard[SDL_SCANCODE_W] = 0;
|
||||||
}
|
}
|
||||||
|
@ -161,9 +168,16 @@ static void handleKeyboard(void)
|
||||||
app.keyboard[SDL_SCANCODE_A] = 0;
|
app.keyboard[SDL_SCANCODE_A] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (app.keyboard[SDL_SCANCODE_D] && battle.ecmTimer == ECM_RECHARGE_TIME)
|
if (app.keyboard[SDL_SCANCODE_D])
|
||||||
|
{
|
||||||
|
if (battle.ecmTimer == ECM_RECHARGE_TIME)
|
||||||
{
|
{
|
||||||
activateECM();
|
activateECM();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
playSound(SND_GUI_DENIED);
|
||||||
|
}
|
||||||
|
|
||||||
app.keyboard[SDL_SCANCODE_D] = 0;
|
app.keyboard[SDL_SCANCODE_D] = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue