From 428155c09339feb6ec84288f2bb5c31ff6f11f52 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Fri, 18 Jan 2019 23:57:19 +0100 Subject: [PATCH] Fix LeapAttack setting attack.IsAiming too early --- OpenRA.Mods.Cnc/Activities/LeapAttack.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Cnc/Activities/LeapAttack.cs b/OpenRA.Mods.Cnc/Activities/LeapAttack.cs index bbcca070d8..0dfb2ef03c 100644 --- a/OpenRA.Mods.Cnc/Activities/LeapAttack.cs +++ b/OpenRA.Mods.Cnc/Activities/LeapAttack.cs @@ -44,7 +44,10 @@ namespace OpenRA.Mods.Cnc.Activities targetMobile = target.Actor.TraitOrDefault(); edible = target.Actor.TraitOrDefault(); } + } + protected override void OnFirstRun(Actor self) + { attack.IsAiming = true; } @@ -98,7 +101,6 @@ namespace OpenRA.Mods.Cnc.Activities protected override void OnLastRun(Actor self) { attack.IsAiming = false; - base.OnLastRun(self); } } }