From ff4ea765c4674494dd1277c2f2bdf9953f89cf4e Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 20 Feb 2021 16:05:12 +0000 Subject: [PATCH] Fixed flashingtics not working if you've never taken any damage in a match before. Two notable consequences of this bug: * The delay when pressing the item button as a spectator to toggle PF_WANTSTOJOIN was not present, leading to a rapid toggle and spurious changeteam commands. * Lightsnaking through map hazards such as Lavender Shrine's stabbies caused you extra spicy unavoidable pain. --- src/k_kart.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 0f97aa9d6..4d70f3907 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -6213,15 +6213,13 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) player->karthud[khud_timeovercam] = 0; - // Specific hack because it insists on setting flashing tics during this anyway... - if (( player->kartstuff[k_spinouttype] & KSPIN_IFRAMES ) == 0) - { - player->powers[pw_flashing] = 0; - } // Make ABSOLUTELY SURE that your flashing tics don't get set WHILE you're still in hit animations. - else if (player->kartstuff[k_spinouttimer] != 0 || player->kartstuff[k_wipeoutslow] != 0) + if (player->kartstuff[k_spinouttimer] != 0 || player->kartstuff[k_wipeoutslow] != 0) { - player->powers[pw_flashing] = K_GetKartFlashing(player); + if (( player->kartstuff[k_spinouttype] & KSPIN_IFRAMES ) == 0) + player->powers[pw_flashing] = 0; + else + player->powers[pw_flashing] = K_GetKartFlashing(player); } if (player->kartstuff[k_spinouttimer])