diff --git a/src/p_mobj.c b/src/p_mobj.c index a81845918b64f5ceb74f41f303c43da579bafc55..5c352cd0444d84ea4ead16298a110a2ecbc7fa01 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -11204,6 +11204,10 @@ void P_RemoveMobj(mobj_t *mobj) P_SetTarget(&mobj->hnext, P_SetTarget(&mobj->hprev, NULL)); + // clear the reference from the mapthing + if (mobj->spawnpoint) + mobj->spawnpoint->mobj = NULL; + R_RemoveMobjInterpolator(mobj); // free block