Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- set currentLevel before calling engineLoadBoard.
This is needed if the compatibility patcher needs to alter mapinfo data.
  • Loading branch information
coelckers committed Jul 27, 2021
1 parent a40d036 commit 9a8ee00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/games/duke/src/premap.cpp
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion source/games/sw/src/game.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 9a8ee00

Please sign in to comment.