oops. a slight pathfinder cock-up.

This commit is contained in:
Chris Forbes
2009-10-27 00:24:09 +13:00
parent 25ca8e3057
commit b4d75f6195
3 changed files with 31 additions and 11 deletions

View File

@@ -89,6 +89,13 @@ namespace OpenRa.Game.Traits
}
public override void Apply()
{
var mobile = Attacker.traits.GetOrDefault<Mobile>();
if (mobile != null)
{
mobile.Cancel(Attacker);
mobile.QueueActivity(new Mobile.MoveTo(Target, 3)); /* todo: get range properly */
}
Attacker.traits.Get<AttackTurreted>().target = Target;
}
}