Allow gas analyzers to continue operation after the user moves without a target. (#11555)

This commit is contained in:
Vordenburg
2022-09-27 16:55:44 -04:00
committed by GitHub
parent 373261a4ee
commit 636694e73d

View File

@@ -81,7 +81,10 @@ namespace Content.Server.Atmos.EntitySystems
{ {
component.Target = target; component.Target = target;
component.User = user; 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; component.Enabled = true;
Dirty(component); Dirty(component);
UpdateAppearance(component); UpdateAppearance(component);