Inline IsValid

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 11:32:53 +01:00
parent 1b13e5e0ec
commit 2d130e31d6
8 changed files with 17 additions and 11 deletions

View File

@@ -82,7 +82,7 @@ namespace Content.Shared.Movement.EntitySystems
var ent = session?.AttachedEntity;
if (ent == null || !ent.IsValid())
if (ent == null || !IoCManager.Resolve<IEntityManager>().EntityExists(ent.Uid))
return false;
if (!ent.TryGetComponent(out T? comp))