diff --git a/src/p_setup.c b/src/p_setup.c index a5544c26b..127a5b880 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2402,7 +2402,17 @@ void P_LoadThingsOnly(void) P_LevelInitStuff(); - P_PrepareThings(lastloadedmaplumpnum + ML_THINGS); + if (W_IsLumpWad(lastloadedmaplumpnum)) // welp it's a map wad in a pk3 + { // HACK: Open wad file rather quickly so we can use the things lump + UINT8 *wadData = W_CacheLumpNum(lastloadedmaplumpnum, PU_STATIC); + filelump_t *fileinfo = (filelump_t *)(wadData + ((wadinfo_t *)wadData)->infotableofs); + fileinfo += ML_THINGS; // we only need the THINGS lump + P_PrepareRawThings(wadData + fileinfo->filepos, fileinfo->size); + Z_Free(wadData); // we're done with this now + } + else // phew it's just a WAD + P_PrepareThings(lastloadedmaplumpnum + ML_THINGS); + P_LoadThings();