KHUD NOT NETSYNCED, hyuu cannot safely use it as a reference point

This commit is contained in:
toaster 2021-11-28 20:27:32 +00:00
parent 15741da0a4
commit 8852874465
2 changed files with 8 additions and 10 deletions

View file

@ -202,7 +202,7 @@ typedef enum
{
// Unsynced, HUD or clientsided effects
// Item box
khud_itemblink, // Item flashing after roulette, prevents Hyudoro stealing AND serves as a mashing indicator
khud_itemblink, // Item flashing after roulette, serves as a mashing indicator
khud_itemblinkmode, // Type of flashing: 0 = white (normal), 1 = red (mashing), 2 = rainbow (enhanced items)
// Rings

View file

@ -4885,8 +4885,7 @@ static void K_DoHyudoroSteal(player_t *player)
// Has an item
&& (players[i].itemtype
&& players[i].itemamount
&& !(players[i].pflags & PF_ITEMOUT)
&& !players[i].karthud[khud_itemblink]))
&& !(players[i].pflags & PF_ITEMOUT))
{
playerswappable[numplayers] = i;
numplayers++;
@ -6355,6 +6354,12 @@ void K_KartPlayerHUDUpdate(player_t *player)
else if (player->karthud[khud_fault] > 0 && player->karthud[khud_fault] < 2*TICRATE)
player->karthud[khud_fault]++;
if (player->karthud[khud_itemblink] && player->karthud[khud_itemblink]-- <= 0)
{
player->karthud[khud_itemblinkmode] = 0;
player->karthud[khud_itemblink] = 0;
}
if (gametype == GT_RACE)
{
// 0 is the fast spin animation, set at 30 tics of ring boost or higher!
@ -6873,13 +6878,6 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
K_HandleTumbleBounce(player);
}
// This doesn't go in HUD update because it has potential gameplay ramifications
if (player->karthud[khud_itemblink] && player->karthud[khud_itemblink]-- <= 0)
{
player->karthud[khud_itemblinkmode] = 0;
player->karthud[khud_itemblink] = 0;
}
K_KartPlayerHUDUpdate(player);
if (battleovertime.enabled && !(player->pflags & PF_ELIMINATED) && player->bumpers <= 0 && player->karmadelay <= 0)