Got rid of some IEntities
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Content.Client.Ghost.UI;
|
||||
using Content.Client.Ghost.UI;
|
||||
using Content.Client.HUD;
|
||||
using Content.Shared.Ghost;
|
||||
using JetBrains.Annotations;
|
||||
@@ -36,7 +36,7 @@ namespace Content.Client.Ghost
|
||||
|
||||
foreach (var ghost in EntityManager.GetAllComponents(typeof(GhostComponent), true))
|
||||
{
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(ghost.Owner, out SpriteComponent? sprite))
|
||||
if (EntityManager.TryGetComponent(ghost.OwnerUid, out SpriteComponent? sprite))
|
||||
{
|
||||
sprite.Visible = value;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ namespace Content.Client.Ghost
|
||||
|
||||
private void OnGhostInit(EntityUid uid, GhostComponent component, ComponentInit args)
|
||||
{
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(component.Owner, out SpriteComponent? sprite))
|
||||
if (EntityManager.TryGetComponent(component.OwnerUid, out SpriteComponent? sprite))
|
||||
{
|
||||
sprite.Visible = GhostVisibility;
|
||||
}
|
||||
@@ -101,10 +101,10 @@ namespace Content.Client.Ghost
|
||||
|
||||
private void OnGhostWarpsResponse(GhostWarpsResponseEvent msg)
|
||||
{
|
||||
var entity = _playerManager.LocalPlayer?.ControlledEntity;
|
||||
var entity = _playerManager.LocalPlayer?.ControlledEntity?.Uid;
|
||||
|
||||
if (entity == null ||
|
||||
!IoCManager.Resolve<IEntityManager>().TryGetComponent(entity, out GhostComponent? ghost))
|
||||
!EntityManager.TryGetComponent(entity.Value, out GhostComponent? ghost))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user