Remove unused code from AttackOrderPower.

This commit is contained in:
Paul Chote
2017-09-07 17:58:48 +01:00
committed by reaperrr
parent 10740de6e9
commit 19b2c33514

View File

@@ -85,14 +85,6 @@ namespace OpenRA.Mods.Cnc.Traits
cursorBlocked = cursor + "-blocked";
}
Actor GetFiringActor(World world, CPos cell)
{
var pos = world.Map.CenterOfCell(cell);
var range = attack.GetMaximumRange().LengthSquared;
return instance.Instances.Where(i => !i.IsTraitPaused).MinByOrDefault(a => (a.Self.CenterPosition - pos).HorizontalLengthSquared).Self;
}
bool IsValidTarget(World world, CPos cell)
{
var pos = world.Map.CenterOfCell(cell);
@@ -107,7 +99,6 @@ namespace OpenRA.Mods.Cnc.Traits
if (mi.Button == expectedButton && IsValidTarget(world, cell))
yield return new Order(order, manager.Self, false)
{
TargetActor = GetFiringActor(world, cell),
TargetLocation = cell,
SuppressVisualFeedback = true
};