Fixes polymorph cooldowns (#26914)

fixes polymorph cooldowns
This commit is contained in:
keronshb
2024-04-13 11:26:51 -04:00
committed by GitHub
parent 2d53cfeabc
commit d4b7bc5aa3

View 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,