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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user