EndOfLevel: Check player->exiting > 0 && <= TICRATE, fixes start-of-level fading in 2.1

Braces in y_inter.c
This commit is contained in:
mazmazz 2018-09-18 23:27:00 -04:00
parent d542c2440d
commit 1dd47e850b
2 changed files with 3 additions and 1 deletions

View file

@ -8792,7 +8792,7 @@ void P_PlayerThink(player_t *player)
// Same check as below, just at 1 second before
// so we can fade music
if (!exitfadestarted &&
player->exiting <= 1*TICRATE &&
player->exiting > 0 && player->exiting <= 1*TICRATE &&
(!multiplayer || gametype == GT_COOP ? !mapheaderinfo[gamemap-1]->musicinterfadeout : true) &&
// don't fade if we're fading during intermission. follows Y_StartIntermission intertype = int_coop
(gametype == GT_RACE || gametype == GT_COMPETITION ? countdown2 == 0 : true) && // don't fade on timeout

View file

@ -696,10 +696,12 @@ void Y_Ticker(void)
boolean anybonuses = false;
if (!intertic) // first time only
{
if (mapheaderinfo[gamemap-1]->musicinterfadeout)
S_FadeOutStopMusic(mapheaderinfo[gamemap-1]->musicinterfadeout);
else
S_ChangeMusicInternal("_clear", false); // don't loop it
}
if (intertic < TICRATE) // one second pause before tally begins
return;