mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-12 21:01:00 +00:00
Fix end-of-level fading for cv_playersforexit
(Code in p_user.c was from 2.2, where cv_playersforexit has different values so that the player exit check works differently)
This commit is contained in:
parent
a1ccb8512d
commit
587a51a957
1 changed files with 4 additions and 5 deletions
|
@ -8836,7 +8836,7 @@ void P_PlayerThink(player_t *player)
|
|||
{
|
||||
if (cv_playersforexit.value)
|
||||
{
|
||||
INT32 i, total = 0, exiting = 0;
|
||||
INT32 i;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
|
@ -8845,12 +8845,11 @@ void P_PlayerThink(player_t *player)
|
|||
if (players[i].lives <= 0)
|
||||
continue;
|
||||
|
||||
total++;
|
||||
if (players[i].exiting && players[i].exiting < 1*TICRATE+1)
|
||||
exiting++;
|
||||
if (!players[i].exiting || players[i].exiting > 1*TICRATE)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!total || ((4*exiting)/total) >= cv_playersforexit.value)
|
||||
if (i == MAXPLAYERS)
|
||||
{
|
||||
exitfadestarted = true;
|
||||
S_FadeOutStopMusic(1*MUSICRATE);
|
||||
|
|
Loading…
Reference in a new issue