diff --git a/src/d_main.c b/src/d_main.c index 14900aa29..53897bf56 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1260,13 +1260,19 @@ static void D_FindAddonsToAutoload(void) // ok so theres still issues with players adding stuff to autoload by accident // sometimes this stuff contains maps // you can probably imagine how that goes in a netgame.... - if (W_CheckAutoLoadContainsMap(wadsToAutoload)) + int retmap = W_CheckAutoLoadContainsMap(wadsToAutoload); + if (retmap == -1) + { + CONS_Alert(CONS_WARNING, "Autoload: file %s was not found or not valid.\n", wadsToAutoload); + continue; + } + if (retmap > 0) { CONS_Alert(CONS_WARNING, "Autoload: file %s contains map data, this WILL cause crashes and desynchs! skipping...\n", wadsToAutoload); continue; } - if (!postload && W_CheckPostLoadList(wadsToAutoload)) + if (!postload && W_CheckPostLoadList(wadsToAutoload) > 0) { CONS_Printf("Autoload: forcing postload for file %s\n", wadsToAutoload); postload = true; diff --git a/src/p_setup.c b/src/p_setup.c index 108fe396f..887f5e2f0 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3433,7 +3433,13 @@ UINT16 P_PartialAddWadFile(const char *wadfilename, boolean local) { // check if someone tries to load maps locally lol // do this here so we can skip loading the file anyways - if (W_CheckAutoLoadContainsMap(wadfilename)) + int retmap = W_CheckAutoLoadContainsMap(wadfilename); + if (retmap == -1) + { + CONS_Alert(CONS_WARNING, "addilelocal: file %s was not found or not valid.\n", wadfilename); + return UINT16_MAX; + } + if (retmap > 0) { CONS_Alert(CONS_WARNING, "addilelocal: locally added file %s contains map data, this WILL cause crashes and desynchs! not added.\n", wadfilename); return UINT16_MAX;