Fixes polymorph cooldowns (#26914)

fixes polymorph cooldowns

(cherry picked from commit d4b7bc5aa3)
This commit is contained in:
keronshb
2024-04-21 21:54:42 +02:00
committed by NullWanderer
parent b11f3a16d9
commit 9c7b440e79
@@ -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,