mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'fix-7th-place-game-over' into 'master'
Lose player life before P_CheckRacers on exit Closes #1022 See merge request KartKrew/Kart!1924
This commit is contained in:
commit
0a0179e1df
1 changed files with 14 additions and 11 deletions
25
src/p_user.c
25
src/p_user.c
|
|
@ -1206,14 +1206,26 @@ void P_DoPlayerExit(player_t *player, pflags_t flags)
|
|||
|
||||
player->exiting = 1;
|
||||
|
||||
if (!player->spectator && (gametyperules & GTR_CIRCUIT)) // Special Race-like handling
|
||||
{
|
||||
K_UpdateAllPlayerPositions();
|
||||
}
|
||||
|
||||
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
|
||||
K_PlayerLoseLife(player);
|
||||
}
|
||||
|
||||
if (!player->spectator)
|
||||
{
|
||||
ClearFakePlayerSkin(player);
|
||||
|
||||
if ((gametyperules & GTR_CIRCUIT)) // Special Race-like handling
|
||||
{
|
||||
K_UpdateAllPlayerPositions();
|
||||
|
||||
if (P_CheckRacers() && !exitcountdown)
|
||||
{
|
||||
G_BeginLevelExit();
|
||||
|
|
@ -1225,17 +1237,8 @@ void P_DoPlayerExit(player_t *player, pflags_t flags)
|
|||
}
|
||||
}
|
||||
|
||||
const boolean losing = K_IsPlayerLosing(player); // HEY!!!! Set it AFTER K_UpdateAllPlayerPositions!!!!
|
||||
const boolean specialout = (specialstageinfo.valid == true && losing == true);
|
||||
|
||||
K_UpdatePowerLevelsFinalize(player, false);
|
||||
|
||||
if (G_GametypeUsesLives() && losing)
|
||||
{
|
||||
// Remove a life from the losing player
|
||||
K_PlayerLoseLife(player);
|
||||
}
|
||||
|
||||
if (P_IsLocalPlayer(player) && !specialout && musiccountdown == 0)
|
||||
{
|
||||
Music_Play("finish_silence");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue