From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Tue, 16 May 2023 03:00:13 +0000 (+1200) Subject: Fix action state handling (#16491) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=136e086a2bc4ddb6560197fc2d2a173c114614b9;p=space-station-14.git Fix action state handling (#16491) --- diff --git a/Content.Client/Actions/ActionsSystem.cs b/Content.Client/Actions/ActionsSystem.cs index c4f3b14495..08cdb8c832 100644 --- a/Content.Client/Actions/ActionsSystem.cs +++ b/Content.Client/Actions/ActionsSystem.cs @@ -78,7 +78,6 @@ namespace Content.Client.Actions } act.CopyFrom(serverAct); - serverActions.Remove(serverAct); } var added = new List(); @@ -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);