diff options
Diffstat (limited to 'src/heretic/d_main.c')
-rw-r--r-- | src/heretic/d_main.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c index 669d7b3d..70fd57c0 100644 --- a/src/heretic/d_main.c +++ b/src/heretic/d_main.c @@ -857,12 +857,18 @@ void D_DoomMain(void) // -FILE [filename] [filename] ... // Add files to the wad list. p = M_CheckParm("-file"); + if (p) - { // the parms after p are wadfile/lump names, until end of parms + { + char *filename; + + // the parms after p are wadfile/lump names, until end of parms // or another - preceded parm + while (++p != myargc && myargv[p][0] != '-') { - D_AddFile(myargv[p]); + filename = D_FindWADByName(myargv[p]); + D_AddFile(filename); } } @@ -1011,7 +1017,7 @@ void D_DoomMain(void) // Check valid episode and map if (autostart || netgame) { - if (M_ValidEpisodeMap(startepisode, startmap) == false) + if (!D_ValidEpisodeMap(gamemission, gamemode, startepisode, startmap)) { startepisode = 1; startmap = 1; |