fixes ghost duplication on aghosting (#3235)
Co-authored-by: Injazz <injazza@gmail.com>
This commit is contained in:
@@ -33,14 +33,12 @@ namespace Content.Server.Administration.Commands
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mind.VisitingEntity != null && mind.VisitingEntity.Prototype?.ID == "AdminObserver")
|
if (mind.VisitingEntity != null && mind.VisitingEntity.HasComponent<GhostComponent>())
|
||||||
{
|
{
|
||||||
var visiting = mind.VisitingEntity;
|
shell.WriteLine("Aren't you a ghost already?");
|
||||||
mind.UnVisit();
|
return;
|
||||||
visiting.Delete();
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
var canReturn = mind.CurrentEntity != null;
|
var canReturn = mind.CurrentEntity != null;
|
||||||
var ghost = IoCManager.Resolve<IEntityManager>()
|
var ghost = IoCManager.Resolve<IEntityManager>()
|
||||||
.SpawnEntity("AdminObserver", player.AttachedEntity?.Transform.Coordinates
|
.SpawnEntity("AdminObserver", player.AttachedEntity?.Transform.Coordinates
|
||||||
@@ -61,4 +59,3 @@ namespace Content.Server.Administration.Commands
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user