diff --git a/src/p_mobj.c b/src/p_mobj.c index c8adb6f1d..d6352bc2a 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -6900,6 +6900,13 @@ static void P_AddOverlay(mobj_t *thing) static void P_RemoveOverlay(mobj_t *thing) { mobj_t *mo; + if (overlaycap == thing) + { + P_SetTarget(&overlaycap, thing->hnext); + P_SetTarget(&thing->hnext, NULL); + return; + } + for (mo = overlaycap; mo; mo = mo->hnext) { if (mo->hnext != thing)