Inline LifeStage
This commit is contained in:
@@ -61,7 +61,7 @@ namespace Content.Shared.Pulling
|
||||
|
||||
RaiseLocalEvent(puller.OwnerUid, message, broadcast: false);
|
||||
|
||||
if (pullable.Owner.LifeStage <= EntityLifeStage.MapInitialized)
|
||||
if ((!IoCManager.Resolve<IEntityManager>().EntityExists(pullable.Owner.Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(pullable.Owner.Uid).EntityLifeStage) <= EntityLifeStage.MapInitialized)
|
||||
RaiseLocalEvent(pullable.OwnerUid, message);
|
||||
|
||||
// Networking
|
||||
|
||||
@@ -79,7 +79,8 @@ namespace Content.Shared.SubFloor
|
||||
private void OnSubFloorTerminating(EntityUid uid, SubFloorHideComponent component, ComponentShutdown _)
|
||||
{
|
||||
// If component is being deleted don't need to worry about updating any component stuff because it won't matter very shortly.
|
||||
if (EntityManager.GetEntity(uid).LifeStage >= EntityLifeStage.Terminating) return;
|
||||
IEntity tempQualifier = EntityManager.GetEntity(uid);
|
||||
if ((!IoCManager.Resolve<IEntityManager>().EntityExists(tempQualifier.Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(tempQualifier.Uid).EntityLifeStage) >= EntityLifeStage.Terminating) return;
|
||||
|
||||
// Regardless of whether we're on a subfloor or not, unhide.
|
||||
UpdateEntity(uid, true);
|
||||
|
||||
Reference in New Issue
Block a user