Fix action state handling (#16491)

This commit is contained in:
Leon Friedrich
2023-05-16 15:00:13 +12:00
committed by GitHub
parent baa9be19bb
commit 136e086a2b

View File

@@ -78,7 +78,6 @@ namespace Content.Client.Actions
}
act.CopyFrom(serverAct);
serverActions.Remove(serverAct);
}
var added = new List<ActionType>();
@@ -86,6 +85,9 @@ namespace Content.Client.Actions
// Anything that remains is a new action
foreach (var newAct in serverActions)
{
if (component.Actions.Contains(newAct))
continue;
// We create a new action, not just sorting a reference to the state's action.
var action = (ActionType) newAct.Clone();
component.Actions.Add(action);