]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix action state handling (#16491)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Tue, 16 May 2023 03:00:13 +0000 (15:00 +1200)
committerGitHub <noreply@github.com>
Tue, 16 May 2023 03:00:13 +0000 (13:00 +1000)
Content.Client/Actions/ActionsSystem.cs

index c4f3b14495c7ae6b1f16faf5981837a42c994b0c..08cdb8c832f7d3c68f7a8ea459e4a0bdf83999ca 100644 (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);