Misc state-handling changes (#16444)
This commit is contained in:
@@ -59,7 +59,8 @@ namespace Content.Client.Actions
|
||||
if (args.Current is not ActionsComponentState state)
|
||||
return;
|
||||
|
||||
var serverActions = new SortedSet<ActionType>(state.Actions);
|
||||
state.SortedActions ??= new SortedSet<ActionType>(state.Actions);
|
||||
var serverActions = state.SortedActions;
|
||||
var removed = new List<ActionType>();
|
||||
|
||||
foreach (var act in component.Actions.ToList())
|
||||
|
||||
@@ -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) &&
|
||||
|
||||
Reference in New Issue
Block a user