From 8ea4dc6a96617377c46dc574b75dec4e9b6bafd4 Mon Sep 17 00:00:00 2001 From: Raeschen Date: Fri, 1 Mar 2024 19:04:56 +0100 Subject: [PATCH] Fix observer/move (Shields not following you) (#7856) --- code/datums/observation/moved.dm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/datums/observation/moved.dm b/code/datums/observation/moved.dm index 393abcd553..9ae9d91ceb 100644 --- a/code/datums/observation/moved.dm +++ b/code/datums/observation/moved.dm @@ -32,6 +32,12 @@ GLOBAL_DATUM_INIT(moved_event, /decl/observ/moved, new) . = ..() am.RegisterSignal(src,COMSIG_OBSERVER_MOVED, /atom/movable/proc/recursive_move, override = TRUE) +/atom/movable/Initialize(mapload) + . = ..() + if(istype(loc, /atom/movable)) // on initialise, if i'm inside a thing, preregister this. + var/atom/movable/am = loc + RegisterSignal(am, COMSIG_OBSERVER_MOVED, /atom/movable/proc/recursive_move, override = TRUE) + /atom/movable/Exited(var/atom/movable/am, atom/old_loc) . = ..() am.UnregisterSignal(src,COMSIG_OBSERVER_MOVED)