Also tick (almost) all karthud array timers even during hitlag

Only exception is timers relating to ring usage, as that's intended to signify ring boost power (which is obviously paused during hitlag)
This commit is contained in:
toaster 2022-10-15 16:49:51 +01:00
parent ec437b199c
commit 6c9c6eeaf8
2 changed files with 22 additions and 20 deletions

View file

@ -7824,7 +7824,9 @@ void K_KartPlayerHUDUpdate(player_t *player)
player->karthud[khud_itemblink] = 0;
}
if (gametype == GT_RACE)
if (!(gametyperules & GTR_SPHERES))
{
if (player->mo && player->mo->hitlag <= 0)
{
// 0 is the fast spin animation, set at 30 tics of ring boost or higher!
if (player->ringboost >= 30)
@ -7850,6 +7852,7 @@ void K_KartPlayerHUDUpdate(player_t *player)
player->karthud[khud_ringtics] = min(RINGANIM_DELAYMAX, player->karthud[khud_ringdelay])-1;
}
}
}
if (player->pflags & PF_RINGLOCK)
{
@ -8461,8 +8464,6 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
K_UpdateTripwire(player);
K_KartPlayerHUDUpdate(player);
if (battleovertime.enabled && !(player->pflags & PF_ELIMINATED) && player->bumpers <= 0 && player->karmadelay <= 0)
{
if (player->overtimekarma)

View file

@ -617,6 +617,7 @@ void P_Ticker(boolean run)
if (!PLAYERCONDITION(i))
continue;
P_PlayerThink(&players[i]);
K_KartPlayerHUDUpdate(&players[i]);
}
#undef PLAYERCONDITION