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.
This commit is contained in:
toaster 2021-02-20 16:05:12 +00:00
parent 5ee4680c04
commit ff4ea765c4

View file

@ -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])