More consistent level init

- encoremode is set to the appropriate value
    - TITLE: Never
    - Podium: GP setting
    - Fixes a bug discovered while repeatedly testing Adventure Example.
- Remove the pointless maptol and globalweather set
    - Already done in P_LoadLevel and P_InitSpecials respectively
This commit is contained in:
toaster 2023-10-23 21:54:48 +01:00
parent a8717f8ee2
commit bc8c044bb3
3 changed files with 3 additions and 8 deletions

View file

@ -1475,6 +1475,8 @@ void F_StartTitleScreen(void)
INT32 titleMapNum; INT32 titleMapNum;
setup_numplayers = 0; setup_numplayers = 0;
encoremode = false;
if (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS) if (gamestate != GS_TITLESCREEN && gamestate != GS_WAITINGPLAYERS)
{ {
ttuser_count = 0; ttuser_count = 0;
@ -1495,9 +1497,6 @@ void F_StartTitleScreen(void)
titlemapinaction = true; titlemapinaction = true;
gamemap = titleMapNum+1; gamemap = titleMapNum+1;
maptol = mapheaderinfo[titleMapNum]->typeoflevel;
globalweather = mapheaderinfo[titleMapNum]->weather;
G_DoLoadLevelEx(true, GS_TITLESCREEN); G_DoLoadLevelEx(true, GS_TITLESCREEN);
if (!titlemap) if (!titlemap)
return; return;

View file

@ -5811,9 +5811,6 @@ void G_InitNew(UINT8 pencoremode, INT32 map, boolean resetplayer, boolean skippr
gamemap = map; gamemap = map;
maptol = mapheaderinfo[gamemap-1]->typeoflevel;
globalweather = mapheaderinfo[gamemap-1]->weather;
// Don't carry over custom music change to another map. // Don't carry over custom music change to another map.
mapmusflags |= MUSIC_RELOADRESET; mapmusflags |= MUSIC_RELOADRESET;

View file

@ -274,8 +274,7 @@ boolean K_StartCeremony(void)
{ {
gamemap = podiumMapNum+1; gamemap = podiumMapNum+1;
maptol = mapheaderinfo[gamemap-1]->typeoflevel; encoremode = grandprixinfo.encore;
globalweather = mapheaderinfo[gamemap-1]->weather;
if (savedata.lives > 0) if (savedata.lives > 0)
{ {