From 60d58d2d35f52636a0401142bfae14d135eb489e Mon Sep 17 00:00:00 2001 From: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Date: Thu, 20 May 2021 03:55:47 -0700 Subject: [PATCH] Fixes a bug in signal unregistration code that was causing unrelated objects to lose their registration in a (#59116) This was causing unrelated objects to lose their registration in a hyper rare case. The process went something like: when object foo is registered to something and object bar is registered to the same object with a different signal it will remove foo's signal only when foo is the only one registered to the object with that signal Why it's good for the game This was breaking #58918 when blood wasn't qdel'd post test. I'm so happy I found this. It's a rare case, so I doubt it'll effect a lot of things, but I can trust UnregisterSignal again, which is very nice. --- code/datums/components/_component.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index 91e8a0cc349..c2e5a24fcab 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -235,6 +235,8 @@ target.comp_lookup = null break if(0) + if(lookup[sig] != src) + continue lookup -= sig if(!length(lookup)) target.comp_lookup = null