Inline QueueDelete

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 11:43:22 +01:00
parent e3227546b3
commit c2e6da1e54
18 changed files with 26 additions and 22 deletions

View File

@@ -226,7 +226,7 @@ namespace Content.Client.Construction
{
if (_ghosts.TryGetValue(ghostId, out var ghost))
{
ghost.Owner.QueueDelete();
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(ghost.Owner.Uid);
_ghosts.Remove(ghostId);
}
}
@@ -238,7 +238,7 @@ namespace Content.Client.Construction
{
foreach (var (_, ghost) in _ghosts)
{
ghost.Owner.QueueDelete();
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(ghost.Owner.Uid);
}
_ghosts.Clear();