Skip to content

Commit

Permalink
another green ghost fix
Browse files Browse the repository at this point in the history
also fixes your active hand thing disappearing sometimes
  • Loading branch information
TalkingCactus committed Oct 16, 2023
1 parent 3dca4b8 commit 9bad4a6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -125,6 +130,7 @@

/atom/movable/screen/inventory/MouseEntered()
..()
ClearGhosts()
add_overlays()

/atom/movable/screen/inventory/MouseExited()
Expand Down

0 comments on commit 9bad4a6

Please sign in to comment.