Fix LaserZap not being removed if HitAnim is not defined

This avoids degrading performance over time as well as an (albeit unlikely) OutOfMemoryException.
This commit is contained in:
reaperrr
2016-09-26 01:36:02 +02:00
parent 2d00a24855
commit d080770828

View File

@@ -86,6 +86,8 @@ namespace OpenRA.Mods.Common.Projectiles
{ {
if (hitanim != null) if (hitanim != null)
hitanim.PlayThen(info.HitAnimSequence, () => animationComplete = true); hitanim.PlayThen(info.HitAnimSequence, () => animationComplete = true);
else
animationComplete = true;
args.Weapon.Impact(Target.FromPos(target), args.SourceActor, args.DamageModifiers); args.Weapon.Impact(Target.FromPos(target), args.SourceActor, args.DamageModifiers);
doneDamage = true; doneDamage = true;