From b7bb719173793ec6ee8fe57df0cce5da037d4890 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Thu, 9 Apr 2015 23:11:08 +0200 Subject: [PATCH] De-hardcoded LaserZap animation sequence --- OpenRA.Mods.Common/Effects/LaserZap.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Effects/LaserZap.cs b/OpenRA.Mods.Common/Effects/LaserZap.cs index 5068c686a9..97469faf65 100644 --- a/OpenRA.Mods.Common/Effects/LaserZap.cs +++ b/OpenRA.Mods.Common/Effects/LaserZap.cs @@ -26,8 +26,10 @@ namespace OpenRA.Mods.Common.Effects public readonly bool UsePlayerColor = false; [Desc("Laser color in (A,)R,G,B.")] public readonly Color Color = Color.Red; - [Desc("Impact animation. Requires a regular animation with idle: sequence instead of explosion special case.")] + [Desc("Impact animation.")] public readonly string HitAnim = null; + [Desc("Sequence of impact animation to use.")] + public readonly string HitAnimSequence = "idle"; public readonly string HitAnimPalette = "effect"; public IEffect Create(ProjectileArgs args) @@ -68,7 +70,7 @@ namespace OpenRA.Mods.Common.Effects if (!doneDamage) { if (hitanim != null) - hitanim.PlayThen("idle", () => animationComplete = true); + hitanim.PlayThen(info.HitAnimSequence, () => animationComplete = true); args.Weapon.Impact(Target.FromPos(target), args.SourceActor, args.DamageModifiers); doneDamage = true;