Inline Deleted
This commit is contained in:
@@ -2,6 +2,7 @@ using System.Collections.Generic;
|
||||
using Content.Server.Hands.Components;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Server.AI.WorldState.States.Inventory
|
||||
{
|
||||
@@ -16,7 +17,7 @@ namespace Content.Server.AI.WorldState.States.Inventory
|
||||
{
|
||||
foreach (var item in handsComponent.GetAllHeldItems())
|
||||
{
|
||||
if (item.Owner.Deleted)
|
||||
if ((!IoCManager.Resolve<IEntityManager>().EntityExists(item.Owner.Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(item.Owner.Uid).EntityLifeStage) >= EntityLifeStage.Deleted)
|
||||
continue;
|
||||
|
||||
yield return item.Owner;
|
||||
|
||||
Reference in New Issue
Block a user