Check equatable on client-predicted BUI states (#5671)

This commit is contained in:
metalgearsloth
2025-02-12 13:29:19 +11:00
committed by GitHub
parent a734bc50fa
commit bb9517fd19

View File

@@ -755,8 +755,11 @@ public abstract class SharedUserInterfaceSystem : EntitySystem
// Predict the change on client
if (state != null && _netManager.IsClient && entity.Comp.ClientOpenInterfaces.TryGetValue(key, out var bui))
{
bui.UpdateState(state);
bui.Update();
if (bui.State?.Equals(state) != true)
{
bui.UpdateState(state);
bui.Update();
}
}
DirtyField(entity, nameof(UserInterfaceComponent.States));