From 636694e73d00637dc317bf14ca17318f48ea4e1b Mon Sep 17 00:00:00 2001 From: Vordenburg <114301317+Vordenburg@users.noreply.github.com> Date: Tue, 27 Sep 2022 16:55:44 -0400 Subject: [PATCH] Allow gas analyzers to continue operation after the user moves without a target. (#11555) --- Content.Server/Atmos/EntitySystems/GasAnalyzerSystem.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Server/Atmos/EntitySystems/GasAnalyzerSystem.cs b/Content.Server/Atmos/EntitySystems/GasAnalyzerSystem.cs index 39e63e4e25..6e9461e66e 100644 --- a/Content.Server/Atmos/EntitySystems/GasAnalyzerSystem.cs +++ b/Content.Server/Atmos/EntitySystems/GasAnalyzerSystem.cs @@ -81,7 +81,10 @@ namespace Content.Server.Atmos.EntitySystems { component.Target = target; component.User = user; - component.LastPosition = Transform(target ?? user).Coordinates; + if (target != null) + component.LastPosition = Transform(target.Value).Coordinates; + else + component.LastPosition = null; component.Enabled = true; Dirty(component); UpdateAppearance(component);