Turns out we don't need to spawn a timer to delete ghosts anymore

This commit is contained in:
zumorica
2020-04-17 19:23:06 +02:00
parent 02ccc6dc45
commit c2e328e5ae
3 changed files with 3 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ namespace Content.Server.Administration
{ {
var visiting = mind.VisitingEntity; var visiting = mind.VisitingEntity;
mind.UnVisit(); mind.UnVisit();
Timer.Spawn(100, visiting.Delete); visiting.Delete();
} }
else else
{ {

View File

@@ -50,7 +50,7 @@ namespace Content.Server.GameObjects.Components.Observer
if (netChannel == null || netChannel == actor.playerSession.ConnectedClient) if (netChannel == null || netChannel == actor.playerSession.ConnectedClient)
{ {
actor.playerSession.ContentData().Mind.UnVisit(); actor.playerSession.ContentData().Mind.UnVisit();
Timer.Spawn(100, Owner.Delete); Owner.Delete();
} }
break; break;
case PlayerAttachedMsg msg: case PlayerAttachedMsg msg:

View File

@@ -38,7 +38,7 @@ namespace Content.Server.Observer
if (mind.VisitingEntity != null) if (mind.VisitingEntity != null)
{ {
mind.UnVisit(); mind.UnVisit();
Timer.Spawn(100, mind.VisitingEntity.Delete); mind.VisitingEntity.Delete();
} }
var position = player.AttachedEntity?.Transform.GridPosition ?? IoCManager.Resolve<IGameTicker>().GetObserverSpawnPoint(); var position = player.AttachedEntity?.Transform.GridPosition ?? IoCManager.Resolve<IGameTicker>().GetObserverSpawnPoint();