Fix aghost when aghosting from a ghost (#12252)

This commit is contained in:
Jacob Tong 2022-10-28 19:38:53 -07:00 committed by GitHub
parent 1e97d6defb
commit dfd72c5db2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
using Content.Server.GameTicking;
using Content.Server.GameTicking;
using Content.Server.Ghost.Components;
using Content.Server.Players;
using Content.Shared.Administration;
@ -40,7 +40,8 @@ namespace Content.Server.Administration.Commands
return;
}
var canReturn = mind.CurrentEntity != null;
var canReturn = mind.CurrentEntity != null
&& !_entities.HasComponent<GhostComponent>(mind.CurrentEntity);
var coordinates = player.AttachedEntity != null
? _entities.GetComponent<TransformComponent>(player.AttachedEntity.Value).Coordinates
: EntitySystem.Get<GameTicker>().GetObserverSpawnPoint();