Fix ControlMob not deleting ghosts

This commit is contained in:
zumorica
2020-04-17 19:28:08 +02:00
parent a4110799b8
commit a408cdad0a
2 changed files with 11 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
using Content.Server.GameObjects.Components.Mobs;
using Content.Server.GameObjects.Components.Observer;
using Content.Server.Mobs;
using Content.Server.Players;
using Robust.Server.Interfaces.Console;
@@ -55,9 +56,14 @@ namespace Content.Server.Administration
return;
}
var oldEntity = mind.CurrentEntity;
mindComponent.Mind?.TransferTo(null);
mind.TransferTo(target);
if(oldEntity.HasComponent<GhostComponent>())
oldEntity.Delete();
}
}
}