mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
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
This commit is contained in:
commit
ee4a3fffee
1 changed files with 8 additions and 0 deletions
|
@ -657,6 +657,14 @@ static void Polyobj_spawnPolyObj(INT32 num, mobj_t *spawnSpot, INT32 id)
|
||||||
// TODO: sound sequence is in args[3]
|
// 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
|
// set the polyobject's spawn spot
|
||||||
po->spawnSpot.x = spawnSpot->x;
|
po->spawnSpot.x = spawnSpot->x;
|
||||||
|
|
Loading…
Reference in a new issue