mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
move the node number validation out of RecursiveHullCheck and into the bsp
loader
This commit is contained in:
parent
b1f264b203
commit
ce3eddb89c
2 changed files with 7 additions and 4 deletions
|
@ -747,6 +747,13 @@ Mod_LoadClipnodes (lump_t *l)
|
|||
out->planenum = LittleLong (in->planenum);
|
||||
out->children[0] = LittleShort (in->children[0]);
|
||||
out->children[1] = LittleShort (in->children[1]);
|
||||
if ((out->children[0] >= 0
|
||||
&& (out->children[0] < hull->firstclipnode
|
||||
|| out->children[0] > hull->lastclipnode))
|
||||
|| (out->children[1] >= 0
|
||||
&& (out->children[1] < hull->firstclipnode
|
||||
|| out->children[1] > hull->lastclipnode)))
|
||||
Sys_Error ("Mod_LoadClipnodes: bad node number");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -207,10 +207,6 @@ PM_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1,
|
|||
trace->startsolid = true;
|
||||
return true; // empty
|
||||
}
|
||||
// LordHavoc: this can be eliminated by validating in the loader... but
|
||||
// Mercury told me not to bother
|
||||
if (num < hull->firstclipnode || num > hull->lastclipnode)
|
||||
Sys_Error ("PM_RecursiveHullCheck: bad node number");
|
||||
|
||||
// find the point distances
|
||||
node = hull->clipnodes + num;
|
||||
|
|
Loading…
Reference in a new issue