Skip to content
Snippets Groups Projects
Commit ee4a3fff authored by Monster Iestyn's avatar Monster Iestyn
Browse files

Merge branch 'polyobj-setup-fixes' into 'master'

Polyobj setup fixes

If you're wondering why ERZ2 crashes lately, yes, it's my fault once again it turns out! Ideally we shouldn't have loose spawn points or anchors without an actual PolyObject to go with them in the first place, but this fix re-adds the safety check that prevented them from crashing the game before.

If it wasn't clear already, this fix is rather important, so please get in asap.

See merge request !7
parents 2818b2a1 66b7597e
No related branches found
No related tags found
No related merge requests found
......@@ -657,6 +657,14 @@ static void Polyobj_spawnPolyObj(INT32 num, mobj_t *spawnSpot, INT32 id)
// TODO: sound sequence is in args[3]
}*/
// make sure array isn't empty
// since Polyobj_findExplicit is disabled currently, we have to do things here instead now!
if (po->segCount == 0)
{
po->isBad = true;
CONS_Debug(DBG_POLYOBJ, "Polyobject %d is empty\n", po->id);
return;
}
// set the polyobject's spawn spot
po->spawnSpot.x = spawnSpot->x;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment