mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-18 02:21:47 +00:00
Do the usual hack for loading a lump from a map WAD in a pk3, but this time for P_LoadThingsOnly
This commit is contained in:
parent
e39bbab532
commit
75d2073307
1 changed files with 11 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue