diff --git a/Content.Server/AI/EntitySystems/NPCSystem.cs b/Content.Server/AI/EntitySystems/NPCSystem.cs index a3e5b518fb..f127c0e6ce 100644 --- a/Content.Server/AI/EntitySystems/NPCSystem.cs +++ b/Content.Server/AI/EntitySystems/NPCSystem.cs @@ -105,13 +105,15 @@ namespace Content.Server.AI.EntitySystems for (var i = 0; i < npcs.Length; i++) { + MetaDataComponent? metadata = null; var index = (i + startIndex) % npcs.Length; var npc = npcs[index]; - if (npc.Deleted) + if (Deleted(npc.Owner, metadata)) continue; - if (npc.Paused) + // Probably gets resolved in deleted for us already + if (Paused(npc.Owner, metadata)) continue; npc.Update(frameTime); diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Processing.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Processing.cs index eba7619884..7271e138ab 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Processing.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Processing.cs @@ -347,7 +347,7 @@ namespace Content.Server.Atmos.EntitySystems { var atmosphere = _currentRunAtmosphere[_currentRunAtmosphereIndex]; - if (atmosphere.LifeStage >= ComponentLifeStage.Stopping || atmosphere.Paused || !atmosphere.Simulated) + if (atmosphere.LifeStage >= ComponentLifeStage.Stopping || Paused(atmosphere.Owner) || !atmosphere.Simulated) continue; atmosphere.Timer += frameTime; diff --git a/Content.Server/Light/EntitySystems/HandheldLightSystem.cs b/Content.Server/Light/EntitySystems/HandheldLightSystem.cs index 721d985a80..38df9586ac 100644 --- a/Content.Server/Light/EntitySystems/HandheldLightSystem.cs +++ b/Content.Server/Light/EntitySystems/HandheldLightSystem.cs @@ -125,7 +125,7 @@ namespace Content.Server.Light.EntitySystems continue; } - if (handheld.Paused) continue; + if (Paused(handheld.Owner)) continue; TryUpdate(handheld, frameTime); } diff --git a/Content.Server/Physics/Controllers/MoverController.cs b/Content.Server/Physics/Controllers/MoverController.cs index 93be6e8fd5..252da088a4 100644 --- a/Content.Server/Physics/Controllers/MoverController.cs +++ b/Content.Server/Physics/Controllers/MoverController.cs @@ -106,7 +106,7 @@ namespace Content.Server.Physics.Controllers // then do the movement input once for it. foreach (var (shuttle, pilots) in _shuttlePilots) { - if (shuttle.Paused || !EntityManager.TryGetComponent((shuttle).Owner, out PhysicsComponent? body)) continue; + if (Paused(shuttle.Owner) || !TryComp(shuttle.Owner, out PhysicsComponent? body)) continue; // Collate movement linear and angular inputs together var linearInput = Vector2.Zero; @@ -129,7 +129,7 @@ namespace Content.Server.Physics.Controllers if (sprint.Equals(Vector2.Zero)) continue; - var offsetRotation = EntityManager.GetComponent((console).Owner).LocalRotation; + var offsetRotation = EntityManager.GetComponent(console.Owner).LocalRotation; linearInput += offsetRotation.RotateVec(new Vector2(0f, sprint.Y)); angularInput += sprint.X; diff --git a/Content.Server/Shuttles/EntitySystems/ThrusterSystem.cs b/Content.Server/Shuttles/EntitySystems/ThrusterSystem.cs index aad1134431..e9c44b1060 100644 --- a/Content.Server/Shuttles/EntitySystems/ThrusterSystem.cs +++ b/Content.Server/Shuttles/EntitySystems/ThrusterSystem.cs @@ -387,7 +387,9 @@ namespace Content.Server.Shuttles.EntitySystems foreach (var comp in _activeThrusters.ToArray()) { - if (!comp.Firing || comp.Damage == null || comp.Paused || comp.Deleted) continue; + MetaDataComponent? metaData = null; + + if (!comp.Firing || comp.Damage == null || Paused(comp.Owner, metaData) || Deleted(comp.Owner, metaData)) continue; DebugTools.Assert(comp.Colliding.Count > 0); diff --git a/Content.Server/Temperature/Systems/TemperatureSystem.cs b/Content.Server/Temperature/Systems/TemperatureSystem.cs index 8c044ef3dc..ae288b8f36 100644 --- a/Content.Server/Temperature/Systems/TemperatureSystem.cs +++ b/Content.Server/Temperature/Systems/TemperatureSystem.cs @@ -55,10 +55,12 @@ namespace Content.Server.Temperature.Systems foreach (var comp in ShouldUpdateDamage) { - if (comp.Deleted || comp.Paused) + MetaDataComponent? metaData = null; + + if (Deleted(comp.Owner, metaData) || Paused(comp.Owner, metaData)) continue; - ChangeDamage((comp).Owner, comp); + ChangeDamage(comp.Owner, comp); } ShouldUpdateDamage.Clear();