Remove component.Paused (#6285)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
continue;
|
||||
}
|
||||
|
||||
if (handheld.Paused) continue;
|
||||
if (Paused(handheld.Owner)) continue;
|
||||
TryUpdate(handheld, frameTime);
|
||||
}
|
||||
|
||||
|
||||
@@ -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<TransformComponent>((console).Owner).LocalRotation;
|
||||
var offsetRotation = EntityManager.GetComponent<TransformComponent>(console.Owner).LocalRotation;
|
||||
|
||||
linearInput += offsetRotation.RotateVec(new Vector2(0f, sprint.Y));
|
||||
angularInput += sprint.X;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user