mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-20 09:52:18 +00:00
Merge branch 'ttfixes2' into 'next'
Fix title card not showing up at all if focus lost See merge request STJr/SRB2!736
This commit is contained in:
commit
56839f428d
3 changed files with 8 additions and 3 deletions
|
@ -1941,6 +1941,10 @@ boolean G_IsTitleCardAvailable(void)
|
|||
if (gametyperules & GTR_NOTITLECARD)
|
||||
return false;
|
||||
|
||||
// The current level has no name.
|
||||
if (!mapheaderinfo[gamemap-1]->lvlttl[0])
|
||||
return false;
|
||||
|
||||
// The title card is available.
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -3684,8 +3684,7 @@ boolean P_LoadLevel(boolean fromnetsave)
|
|||
return true;
|
||||
|
||||
// If so...
|
||||
if ((!(mapheaderinfo[gamemap-1]->levelflags & LF_NOTITLECARD)) && (*mapheaderinfo[gamemap-1]->lvlttl != '\0'))
|
||||
G_PreLevelTitleCard();
|
||||
G_PreLevelTitleCard();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1278,13 +1278,15 @@ void ST_preDrawTitleCard(void)
|
|||
//
|
||||
void ST_runTitleCard(void)
|
||||
{
|
||||
boolean run = !(paused || P_AutoPause());
|
||||
|
||||
if (!G_IsTitleCardAvailable())
|
||||
return;
|
||||
|
||||
if (lt_ticker >= (lt_endtime + TICRATE))
|
||||
return;
|
||||
|
||||
if (!(paused || P_AutoPause()))
|
||||
if (run || (lt_ticker < PRELEVELTIME))
|
||||
{
|
||||
// tick
|
||||
lt_ticker++;
|
||||
|
|
Loading…
Reference in a new issue