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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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);