diff --git a/Content.Shared/Pinpointer/SharedPinpointerSystem.cs b/Content.Shared/Pinpointer/SharedPinpointerSystem.cs index ea553098ef..b144b738ad 100644 --- a/Content.Shared/Pinpointer/SharedPinpointerSystem.cs +++ b/Content.Shared/Pinpointer/SharedPinpointerSystem.cs @@ -13,6 +13,7 @@ namespace Content.Shared.Pinpointer { base.Initialize(); SubscribeLocalEvent(GetCompState); + SubscribeLocalEvent(OnPinpointerShutdown); } private void GetCompState(EntityUid uid, PinpointerComponent pinpointer, ref ComponentGetState args) @@ -25,6 +26,12 @@ namespace Content.Shared.Pinpointer }; } + private void OnPinpointerShutdown(EntityUid uid, PinpointerComponent component, ComponentShutdown _) + { + // no need to dirty it/etc: it's shutting down anyway! + ActivePinpointers.Remove(uid); + } + /// /// Manually set distance from pinpointer to target ///