Misc state-handling changes (#16444)

This commit is contained in:
Leon Friedrich
2023-05-15 14:22:17 +12:00
committed by GitHub
parent a23de2f219
commit b20cc6f4d3
6 changed files with 29 additions and 13 deletions

View File

@@ -123,7 +123,7 @@ namespace Content.Client.IconSmoothing
public void DirtyNeighbours(EntityUid uid, IconSmoothComponent? comp = null, TransformComponent? transform = null, EntityQuery<IconSmoothComponent>? smoothQuery = null)
{
smoothQuery ??= GetEntityQuery<IconSmoothComponent>();
if (!smoothQuery.Value.Resolve(uid, ref comp))
if (!smoothQuery.Value.Resolve(uid, ref comp) || !comp.Running)
return;
_dirtyEntities.Enqueue(uid);
@@ -195,8 +195,9 @@ namespace Content.Client.IconSmoothing
// Generation on the component is set after an update so we can cull updates that happened this generation.
if (!smoothQuery.Resolve(uid, ref smooth, false)
|| smooth.Mode == IconSmoothingMode.NoSprite
|| smooth.UpdateGeneration == _generation ||
!smooth.Enabled)
|| smooth.UpdateGeneration == _generation
|| !smooth.Enabled
|| !smooth.Running)
{
if (smooth is { Enabled: true } &&
TryComp<SmoothEdgeComponent>(uid, out var edge) &&