mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Disable Drop Dashing while on the Garden Top
This commit is contained in:
parent
610e2c66be
commit
8ff95af61d
1 changed files with 37 additions and 1 deletions
|
|
@ -661,6 +661,42 @@ static void K_DropDashWait(player_t *player)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------
|
||||||
|
static boolean K_CanDropDash(player_t *player)
|
||||||
|
|
||||||
|
Checks if you can use the Drop Dash maneuver.
|
||||||
|
|
||||||
|
Input Arguments:-
|
||||||
|
player - Player to check.
|
||||||
|
|
||||||
|
Return:-
|
||||||
|
Whether a Drop Dash should be allowed.
|
||||||
|
--------------------------------------------------*/
|
||||||
|
static boolean K_CanDropDash(player_t *player)
|
||||||
|
{
|
||||||
|
const UINT16 buttons = K_GetKartButtons(player);
|
||||||
|
|
||||||
|
if (!(buttons & BT_ACCELERATE))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Since we're letting players spin out on respawn, don't let them charge a dropdash in this state. (It wouldn't work anyway)
|
||||||
|
if (player->spinouttimer)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Garden Top is overpowered enough
|
||||||
|
if (player->curshield == KSHIELD_TOP)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------
|
/*--------------------------------------------------
|
||||||
static void K_HandleDropDash(player_t *player)
|
static void K_HandleDropDash(player_t *player)
|
||||||
|
|
||||||
|
|
@ -699,7 +735,7 @@ static void K_HandleDropDash(player_t *player)
|
||||||
// The old behavior was stupid and prone to accidental usage.
|
// The old behavior was stupid and prone to accidental usage.
|
||||||
// Let's rip off Mania instead, and turn this into a Drop Dash!
|
// Let's rip off Mania instead, and turn this into a Drop Dash!
|
||||||
|
|
||||||
if ((buttons & BT_ACCELERATE) && !player->spinouttimer) // Since we're letting players spin out on respawn, don't let them charge a dropdash in this state. (It wouldn't work anyway)
|
if (K_CanDropDash(player))
|
||||||
{
|
{
|
||||||
player->respawn.dropdash++;
|
player->respawn.dropdash++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue