From 9bad4a62c28de924b2150c5cba534dba1758b654 Mon Sep 17 00:00:00 2001 From: TalkingCactus Date: Mon, 16 Oct 2023 19:07:49 -0400 Subject: [PATCH] another green ghost fix also fixes your active hand thing disappearing sometimes --- code/_onclick/hud/screen_objects.dm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 582a7cf1dc5..312b18502b5 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -104,8 +104,13 @@ plane = HUD_PLANE /atom/movable/screen/inventory/proc/ClearGhosts() - cut_overlays() - QDEL_NULL(object_overlay) + //If we have it, get rid of it now the right way. + if(object_overlay) + cut_overlay(object_overlay) + QDEL_NULL(object_overlay) + //If we still have things in our overlays after cutting them, force get rid of all overlays. We only use overlays for the green ghosts anyways. + if(overlays.len && type != /atom/movable/screen/inventory/hand) + cut_overlays() /atom/movable/screen/inventory/Click(location, control, params) if(hud?.mymob && (hud.mymob != usr)) @@ -125,6 +130,7 @@ /atom/movable/screen/inventory/MouseEntered() ..() + ClearGhosts() add_overlays() /atom/movable/screen/inventory/MouseExited()