Player hyudorotimer: use modulate blendmode instead of flickering

- Player invisibility is preserved for other players
- Flicker blendmode (and visibility, for other players) at
  beginning and end of hyudorotimer
This commit is contained in:
James R. 2023-09-17 20:08:24 -07:00
parent 6878c7dd90
commit 2fd5ae3cb3

View file

@ -11667,23 +11667,19 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
if (player->hyudorotimer > 0)
{
if (leveltime & 1)
{
player->mo->renderflags |= RF_DONTDRAW;
}
else
{
if (player->hyudorotimer >= (TICRATE/2) && player->hyudorotimer <= hyudorotime-(TICRATE/2))
player->mo->renderflags |= RF_DONTDRAW | RF_MODULATE;
player->mo->renderflags &= ~K_GetPlayerDontDrawFlag(player);
else
player->mo->renderflags &= ~RF_DONTDRAW;
if (!(leveltime & 1) && (player->hyudorotimer < (TICRATE/2) || player->hyudorotimer > hyudorotime-(TICRATE/2)))
{
player->mo->renderflags &= ~(RF_DONTDRAW | RF_BLENDMASK);
}
player->flashing = player->hyudorotimer; // We'll do this for now, let's people know about the invisible people through subtle hints
}
else if (player->hyudorotimer == 0)
{
player->mo->renderflags &= ~RF_DONTDRAW;
player->mo->renderflags &= ~RF_BLENDMASK;
}
if (player->trickpanel == 1)