Explicitly implement interfaces in AttackBase.
This commit is contained in:
@@ -82,11 +82,12 @@ namespace OpenRA.Mods.D2k.Traits
|
||||
|
||||
// If close enough, we don't care about other actors.
|
||||
var target = self.World.FindActorsInCircle(self.CenterPosition, WormInfo.IgnoreNoiseAttackRange)
|
||||
.FirstOrDefault(x => attackTrait.HasAnyValidWeapons(Target.FromActor(x)));
|
||||
if (target != null)
|
||||
.Select(t => Target.FromActor(t))
|
||||
.FirstOrDefault(t => attackTrait.HasAnyValidWeapons(t));
|
||||
|
||||
if (target.Type == TargetType.Actor)
|
||||
{
|
||||
self.CancelActivity();
|
||||
attackTrait.ResolveOrder(self, new Order("Attack", target, true) { TargetActor = target });
|
||||
attackTrait.AttackTarget(target, false, true, false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user