mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Prioritize lookback frames over turn frames if you're pressing lookback
This commit is contained in:
parent
b7e578b82b
commit
73c61b1010
1 changed files with 8 additions and 1 deletions
|
|
@ -1848,6 +1848,7 @@ void K_KartMoveAnimation(player_t *player)
|
||||||
|
|
||||||
ticcmd_t *cmd = &player->cmd;
|
ticcmd_t *cmd = &player->cmd;
|
||||||
const boolean spinningwheels = ((cmd->buttons & BT_ACCELERATE) || (onground && player->speed > 0));
|
const boolean spinningwheels = ((cmd->buttons & BT_ACCELERATE) || (onground && player->speed > 0));
|
||||||
|
const boolean lookback = (cmd->buttons & BT_LOOKBACK);
|
||||||
|
|
||||||
SINT8 destGlanceDir = 0;
|
SINT8 destGlanceDir = 0;
|
||||||
|
|
||||||
|
|
@ -1945,12 +1946,18 @@ void K_KartMoveAnimation(player_t *player)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (lookback == true)
|
||||||
|
{
|
||||||
|
// Prioritize looking back over turning
|
||||||
|
turndir = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (turndir == 0)
|
if (turndir == 0)
|
||||||
{
|
{
|
||||||
// Only try glancing if you're driving straight.
|
// Only try glancing if you're driving straight.
|
||||||
destGlanceDir = K_GlanceAtPlayers(player);
|
destGlanceDir = K_GlanceAtPlayers(player);
|
||||||
|
|
||||||
if (cmd->buttons & BT_LOOKBACK)
|
if (lookback == true)
|
||||||
{
|
{
|
||||||
if (destGlanceDir == 0)
|
if (destGlanceDir == 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue