Skip to content

Commit

Permalink
Fix autoloading WADs from autoload folder
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Sep 15, 2023
1 parent 84fc957 commit 313a948
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

#### DOOM Retro v5.0.1

* A crash no longer occurs when loading a savegame from a WAD that uses [*DSDHacked*](https://doomwiki.org/wiki/DSDHacked).
* A crash no longer occurs when loading a savegame from a [*DSDHacked*](https://doomwiki.org/wiki/DSDHacked)-compatible WAD.
* These changes have been made when playing [*Smooth DOOM MBF21*](https://www.doomworld.com/forum/topic/133318/):
* Ammo casings will no disappear and leave blood splats on the floor.
* Blood splats now appear around corpses spawned at the start of a map when the `r_corpses_moreblood` CVAR is `on`.
* The `savegame` CVAR is now:
* Updated when deleting a savegame in the save or load game menus using the <kbd><b>DEL</b></kbd> key.
* Not updated if the player cancels entering a savegame description in the save game menu.
* A bug is fixed whereby WADs placed in the `autoload` folder weren’t autoloading.

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

Expand Down
21 changes: 11 additions & 10 deletions src/d_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2223,6 +2223,17 @@ static void D_DoomMainSetup(void)
if (!iwadfile && !modifiedgame && !choseniwad)
I_Error(DOOMRETRO_NAME " couldn't find any IWADs.");

if (!M_CheckParm("-noautoload") && gamemode != shareware)
{
D_SetAutoloadFolder();

autoloading = W_AutoloadFiles(autoloadfolder);
autoloading |= W_AutoloadFiles(autoloadiwadsubfolder);

if (autoloadpwadsubfolder)
autoloading |= W_AutoloadFiles(autoloadpwadsubfolder);
}

W_Init();

FREEDM = (W_CheckNumForName("FREEDM") >= 0);
Expand Down Expand Up @@ -2273,16 +2284,6 @@ static void D_DoomMainSetup(void)
" by entering " BOLD("map E1M8B") ".");
}

if (!M_CheckParm("-noautoload") && gamemode != shareware)
{
D_SetAutoloadFolder();

autoloading = (W_AutoloadFiles(autoloadfolder) || W_AutoloadFiles(autoloadiwadsubfolder));

if (autoloadpwadsubfolder)
autoloading |= W_AutoloadFiles(autoloadpwadsubfolder);
}

I_InitGraphics();
I_InitGameController();

Expand Down

0 comments on commit 313a948

Please sign in to comment.