add checks for missing bsp lumps
not sure why there werent any, the other map lumps have those, and a corrupted file may have those missing also which would just crash instead of telling you wtf is wrong
This commit is contained in:
1 parent
394f406a1a
commit
d291431cb7
1 file changed
+7
@@ -2097,6 +2097,13 @@ static void P_LoadMapBSP(const virtres_t* virt)
|
||||
virtlump_t* virtsegs = vres_Find(virt, "SEGS");
|
||||
virtlump_t* virtnodes = vres_Find(virt, "NODES");
|
||||
|
||||
if (!virtssectors)
|
||||
I_Error("SSECTORS lump not found");
|
||||
if (!virtsegs)
|
||||
I_Error("SEGS lump not found");
|
||||
if (!virtnodes)
|
||||
I_Error("NODES lump not found");
|
||||
|
||||
numsubsectors = virtssectors->size / sizeof(mapsubsector_t);
|
||||
numnodes = virtnodes->size / sizeof(mapnode_t);
|
||||
numsegs = virtsegs->size / sizeof(mapseg_t);
|
||||
|
||||
Reference in new issue
Block a user