From 9b655b519a1728058b3b2712971b44650f0537c5 Mon Sep 17 00:00:00 2001 From: fira Date: Wed, 18 Oct 2023 21:41:41 +0200 Subject: [PATCH] Fixes minor runtime in CAS Guidance system (#4705) # About the pull request Recurring runtime on live server due to lack of unregistering the signal handler ``` proc name: stack trace (/proc/stack_trace) source file: code/__HELPERS/unsorted.dm,1893 usr: CKEY (/mob/living/carbon/human) src: null usr.loc: the floor (135,75,4) (/turf/open/shuttle/dropship) call stack: stack trace("mob_resist overridden. Use ove...") /datum/cas_fire_envelope/uscm_... (/datum/cas_fire_envelope/uscm_dropship): RegisterSignal(CKEY (/mob/living/carbon/human), "mob_resist", "exit_cam_resist", 0) /datum/cas_fire_envelope/uscm_... (/datum/cas_fire_envelope/uscm_dropship): add user to tracking(CKEY (/mob/living/carbon/human)) ... ``` # Explain why it's good for the game Less runtimes in log # Testing Photographs and Procedure Untested # Changelog No user facing changes --- code/game/cas_manager/datums/cas_fire_envelope.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/cas_manager/datums/cas_fire_envelope.dm b/code/game/cas_manager/datums/cas_fire_envelope.dm index d7c939b76e16..330521f34e36 100644 --- a/code/game/cas_manager/datums/cas_fire_envelope.dm +++ b/code/game/cas_manager/datums/cas_fire_envelope.dm @@ -181,7 +181,7 @@ apply_upgrade(user) if(!(user in guidance.users)) guidance.users += user - RegisterSignal(usr, COMSIG_MOB_RESISTED, PROC_REF(exit_cam_resist)) + RegisterSignal(user, COMSIG_MOB_RESISTED, PROC_REF(exit_cam_resist)) /datum/cas_fire_envelope/proc/apply_upgrade(user) @@ -220,6 +220,7 @@ M.reset_view() remove_upgrades(user) guidance.users -= user + UnregisterSignal(user, COMSIG_MOB_RESISTED) /datum/cas_fire_envelope/proc/exit_cam_resist(mob/user) SIGNAL_HANDLER