diff --git a/src/k_grandprix.c b/src/k_grandprix.c index 7ede8533c..5b45c8176 100644 --- a/src/k_grandprix.c +++ b/src/k_grandprix.c @@ -845,7 +845,7 @@ void K_PlayerLoseLife(player_t *player) return; } - if (player->spectator || (player->exiting && !(player->pflags & PF_NOCONTEST)) || player->bot || player->lives <= 0 || (player->pflags & PF_LOSTLIFE)) + if (player->spectator || player->bot || player->lives <= 0 || (player->pflags & PF_LOSTLIFE)) { return; } diff --git a/src/p_user.c b/src/p_user.c index 350ded74c..a491fca98 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1270,9 +1270,6 @@ void P_DoPlayerExit(player_t *player, pflags_t flags) player->pflags |= flags; - const boolean losing = K_IsPlayerLosing(player); - const boolean specialout = (specialstageinfo.valid == true && losing == true); - if (P_IsLocalPlayer(player) && (!player->spectator && !demo.playback)) { legitimateexit = true; @@ -1280,6 +1277,30 @@ void P_DoPlayerExit(player_t *player, pflags_t flags) gamedata->deferredconditioncheck = true; } + player->exiting = 1; + + if (!player->spectator) + { + ClearFakePlayerSkin(player); + + if ((gametyperules & GTR_CIRCUIT)) // Special Race-like handling + { + K_UpdateAllPlayerPositions(); + + if (P_CheckRacers() && !exitcountdown) + { + G_BeginLevelExit(); + } + } + else if (!exitcountdown) // All other gametypes + { + G_BeginLevelExit(); + } + } + + const boolean losing = K_IsPlayerLosing(player); // HEY!!!! Set it AFTER K_UpdateAllPlayerPositions!!!! + const boolean specialout = (specialstageinfo.valid == true && losing == true); + if (G_GametypeUsesLives() && losing) { // Remove a life from the losing player @@ -1292,12 +1313,8 @@ void P_DoPlayerExit(player_t *player, pflags_t flags) musiccountdown = MUSIC_COUNTDOWN_MAX; } - player->exiting = 1; - if (!player->spectator) { - ClearFakePlayerSkin(player); - if (!(gametyperules & GTR_SPHERES)) { player->hudrings = RINGTOTAL(player); @@ -1320,20 +1337,6 @@ void P_DoPlayerExit(player_t *player, pflags_t flags) } } - if ((gametyperules & GTR_CIRCUIT)) // Special Race-like handling - { - K_UpdateAllPlayerPositions(); - - if (P_CheckRacers() && !exitcountdown) - { - G_BeginLevelExit(); - } - } - else if (!exitcountdown) // All other gametypes - { - G_BeginLevelExit(); - } - if (specialstageinfo.valid == true && losing == false && P_MobjWasRemoved(player->mo) == false) { K_MakeObjectReappear(player->mo);