remove the default impl of QueueAttack; implement it in AttackFrontal and AttackLeap

This commit is contained in:
Bob
2010-11-13 14:59:33 +13:00
parent caae95f12e
commit 04e05d9aed
3 changed files with 25 additions and 10 deletions

View File

@@ -39,5 +39,16 @@ namespace OpenRA.Mods.RA
return true;
}
protected override void QueueAttack(Actor self, Target newTarget)
{
var weapon = ChooseWeaponForTarget(newTarget);
if (weapon != null)
self.QueueActivity(
new Activities.Attack(
newTarget,
Math.Max(0, (int)weapon.Info.Range)));
}
}
}