From b5f318b405934ec9ce5554a72d8a9fa6b7f3ba5c Mon Sep 17 00:00:00 2001 From: James R Date: Mon, 4 Mar 2024 21:28:21 -0800 Subject: [PATCH] Freeze auto-respawn while player is in damage state - Still let the respawn prompt appear --- src/k_kart.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/k_kart.c b/src/k_kart.c index a7904a182..cb8ea9f0c 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -8772,7 +8772,14 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) K_DoIngameRespawn(player); } - if (player->bigwaypointgap) + // Don't tick down while in damage state. + // There may be some maps where the timer activates for + // a moment during normal play, but would quickly correct + // itself when the player drives forward. + // If the player is in a damage state, they may not be + // able to move in time. + // Always let the respawn prompt appear. + if (player->bigwaypointgap && (player->bigwaypointgap > AUTORESPAWN_THRESHOLD || !P_PlayerInPain(player))) { player->bigwaypointgap--; if (!player->bigwaypointgap)