]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fixes polymorph cooldowns (#26914)
authorkeronshb <54602815+keronshb@users.noreply.github.com>
Sat, 13 Apr 2024 15:26:51 +0000 (11:26 -0400)
committerGitHub <noreply@github.com>
Sat, 13 Apr 2024 15:26:51 +0000 (11:26 -0400)
fixes polymorph cooldowns

Content.Server/Polymorph/Systems/PolymorphSystem.cs

index b7640ff984358f01c50dbd9db4aaabfa7f7b1de6..8cae15d70df6617f0d0bb535ebf29217d3ffced0 100644 (file)
@@ -118,10 +118,12 @@ public sealed partial class PolymorphSystem : EntitySystem
 
     private void OnPolymorphActionEvent(Entity<PolymorphableComponent> ent, ref PolymorphActionEvent args)
     {
-        if (!_proto.TryIndex(args.ProtoId, out var prototype))
+        if (!_proto.TryIndex(args.ProtoId, out var prototype) || args.Handled)
             return;
 
         PolymorphEntity(ent, prototype.Configuration);
+
+        args.Handled = true;
     }
 
     private void OnRevertPolymorphActionEvent(Entity<PolymorphedEntityComponent> ent,