- set currentLevel before calling engineLoadBoard.

This is needed if the compatibility patcher needs to alter mapinfo data.
This commit is contained in:
Christoph Oelckers 2021-07-27 22:07:16 +02:00
parent a40d036623
commit 9a8ee00aec
2 changed files with 2 additions and 2 deletions

View file

@ -944,9 +944,9 @@ static int LoadTheMap(MapRecord *mi, struct player_struct *p, int gamemode)
I_Error("Cannot load user maps with shareware version!\n");
}
currentLevel = mi;
engineLoadBoard(mi->fileName, isShareware(), &p->pos, &lbang, &p->cursectnum);
currentLevel = mi;
SECRET_SetMapName(mi->DisplayName(), mi->name);
STAT_NewLevel(mi->fileName);

View file

@ -321,8 +321,8 @@ void InitLevel(MapRecord *maprec)
}
int16_t ang;
engineLoadBoard(maprec->fileName, SW_SHAREWARE ? 1 : 0, &Player[0].pos, &ang, &Player[0].cursectnum);
currentLevel = maprec;
engineLoadBoard(maprec->fileName, SW_SHAREWARE ? 1 : 0, &Player[0].pos, &ang, &Player[0].cursectnum);
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
STAT_NewLevel(currentLevel->fileName);