mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
2.3 trick compatlevel
This commit is contained in:
parent
3baf39a1fd
commit
f60551bb18
1 changed files with 10 additions and 2 deletions
12
src/k_kart.c
12
src/k_kart.c
|
|
@ -13635,6 +13635,16 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
|
||||
boolean cantrick = true;
|
||||
UINT16 buttons = player->cmd.buttons;
|
||||
INT16 TRICKTHRESHOLD = 2*KART_FULLTURN/3;
|
||||
|
||||
// 2.3 - aimingcompare
|
||||
if (!!G_CompatLevel(0x000C))
|
||||
{
|
||||
TRICKTHRESHOLD = KART_FULLTURN/2;
|
||||
INT16 aimingcompare = abs(cmd->throwdir) - abs(cmd->turning);
|
||||
if (abs(aimingcompare) < TRICKTHRESHOLD)
|
||||
cantrick = false;
|
||||
}
|
||||
|
||||
// 2.2 - Pre-steering trickpanels
|
||||
if (!G_CompatLevel(0x000A) && !K_PlayerUsesBotMovement(player))
|
||||
|
|
@ -13651,7 +13661,6 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
}
|
||||
|
||||
// Uses cmd->turning over steering intentionally.
|
||||
#define TRICKTHRESHOLD (2*KART_FULLTURN/3)
|
||||
if (cantrick && abs(cmd->turning) > TRICKTHRESHOLD) // side trick
|
||||
{
|
||||
S_StartSoundAtVolume(player->mo, sfx_trick0, 255/2);
|
||||
|
|
@ -13743,7 +13752,6 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
P_SetPlayerMobjState(player->mo, S_KART_FAST);
|
||||
}
|
||||
}
|
||||
#undef TRICKTHRESHOLD
|
||||
|
||||
// Finalise everything.
|
||||
if (player->trickpanel != TRICKSTATE_READY) // just changed from 1?
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue