Fixed a crash I recieved while playtesting bots on Petref which was caused by an invalid subsector reference. This can only happen when the mobj was removed. I have no idea how or why this wasn't caught earlier, but I suspect we inherited this issue from upstream in the merger.

This commit is contained in:
toaster 2020-09-23 12:49:42 +01:00
parent 50fe3a728c
commit f6158b7cf4

View file

@ -8592,6 +8592,8 @@ void P_MobjThinker(mobj_t *mobj)
|| mobj->type == MT_ORBINAUT
|| mobj->type == MT_JAWZ || mobj->type == MT_JAWZ_DUD) {
P_TryMove(mobj, mobj->x, mobj->y, true); // Sets mo->standingslope correctly
if (P_MobjWasRemoved(mobj)) // anything that calls checkposition can be lethal
return;
//if (mobj->standingslope) CONS_Printf("slope physics on mobj\n");
P_ButteredSlope(mobj);
}