mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
P_LoadMapData(): Throw an error if resources are not found.
This commit is contained in:
parent
a4fde93fbb
commit
579362fd3b
1 changed files with 11 additions and 0 deletions
|
@ -1960,6 +1960,17 @@ static void P_LoadMapData(const virtres_t* virt)
|
|||
virtsidedefs = vres_Find(virt, "SIDEDEFS");
|
||||
virtlinedefs = vres_Find(virt, "LINEDEFS");
|
||||
|
||||
if (!virtthings)
|
||||
I_Error("THINGS lump not found");
|
||||
if (!virtvertexes)
|
||||
I_Error("VERTEXES lump not found");
|
||||
if (!virtsectors)
|
||||
I_Error("SECTORS lump not found");
|
||||
if (!virtsidedefs)
|
||||
I_Error("SIDEDEFS lump not found");
|
||||
if (!virtlinedefs)
|
||||
I_Error("LINEDEFS lump not found");
|
||||
|
||||
// Traditional doom map format just assumes the number of elements from the lump sizes.
|
||||
numvertexes = virtvertexes->size / sizeof (mapvertex_t);
|
||||
numsectors = virtsectors->size / sizeof (mapsector_t);
|
||||
|
|
Loading…
Reference in a new issue