From 8278c1d178ecd822daa3e45e3feedd6bc5a4c69d Mon Sep 17 00:00:00 2001 From: EgorDinamit Date: Sun, 11 Feb 2024 18:03:15 +0300 Subject: [PATCH] Replaces destroyed event with a signal on following --- code/modules/mob/observer/following.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/observer/following.dm b/code/modules/mob/observer/following.dm index 6ef4ae13b3c..807795c8df1 100644 --- a/code/modules/mob/observer/following.dm +++ b/code/modules/mob/observer/following.dm @@ -8,7 +8,7 @@ /mob/observer/proc/stop_following() if(!following) return - GLOB.destroyed_event.unregister(following, src) + UnregisterSignal(following, COMSIG_PARENT_QDELETING) GLOB.moved_event.unregister(following, src) GLOB.dir_set_event.unregister(following, src) following = null @@ -16,7 +16,7 @@ /mob/observer/proc/start_following(var/atom/a) stop_following() following = a - GLOB.destroyed_event.register(a, src, .proc/stop_following) + RegisterSignal(a, COMSIG_PARENT_QDELETING, .proc/stop_following) GLOB.moved_event.register(a, src, .proc/keep_following) GLOB.dir_set_event.register(a, src, /atom/proc/recursive_dir_set) keep_following(new_loc = get_turf(following))