Skip to content

Commit

Permalink
Fix savegame in ExM10 or ExM11 crashing on load
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Sep 2, 2023
1 parent c40f758 commit ea89c9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
* Skies can now be drawn horizontally linear by enabling the new `r_linearskies` CVAR, which is `off` by default and when vanilla mode is enabled.
* The automap is now always updated when the `r_screensize` CVAR is changed while it is open.
* A bug is fixed whereby any player movement wouldn’t be canceled when opening the automap and the `am_followmode` CVAR was `off`.
* Savegames that were saved in maps `ExM10` or `ExM11` no longer crash when loaded.

![](https://github.com/bradharding/www.doomretro.com/raw/master/wiki/bigdivider.png)

Expand Down
4 changes: 2 additions & 2 deletions src/p_saveg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1048,12 +1048,12 @@ bool P_ReadSaveGameHeader(char *description)

if (gamemode != commercial)
{
if (gamemap == 10)
if (gamemap == 10 && W_CheckNumForName("E1M10") < 0)
{
gamemap = 4;
M_StringCopy(speciallumpname, "E1M4B", sizeof(speciallumpname));
}
else if (gamemap == 11)
else if (gamemap == 11 && W_CheckNumForName("E1M11") < 0)
{
gamemap = 8;
M_StringCopy(speciallumpname, "E1M8B", sizeof(speciallumpname));
Expand Down

0 comments on commit ea89c9b

Please sign in to comment.