From 90902997ba3a7026265217ff1d73441f22f35069 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Fri, 10 Nov 2023 16:33:50 -0700 Subject: [PATCH] Unset RF_DONTDRAW during controllable non-flashing states --- src/p_user.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 419e78ab6..ced510540 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -4329,12 +4329,12 @@ void P_PlayerThink(player_t *player) } } + boolean deathcontrolled = (player->respawn.state != RESPAWNST_NONE && player->respawn.truedeath == true) + || (player->pflags & PF_NOCONTEST) || (player->karmadelay); + boolean powercontrolled = (player->hyudorotimer) || (player->growshrinktimer > 0); + // Flash player after being hit. - if (!(player->hyudorotimer // SRB2kart - fixes Hyudoro not flashing when it should. - || player->growshrinktimer > 0 // Grow doesn't flash either. - || (player->respawn.state != RESPAWNST_NONE && player->respawn.truedeath == true) // Respawn timer (for drop dash effect) - || (player->pflags & PF_NOCONTEST) // NO CONTEST explosion - || player->karmadelay)) + if (!deathcontrolled && !powercontrolled) { if (player->flashing > 1 && player->flashing < K_GetKartFlashing(player) && (leveltime & 1)) @@ -4342,6 +4342,10 @@ void P_PlayerThink(player_t *player) else player->mo->renderflags &= ~RF_DONTDRAW; } + else if (!deathcontrolled) + { + player->mo->renderflags &= ~RF_DONTDRAW; + } if (player->stairjank > 0) {