Second implementation of Sandworms
Fix tabs in AttackSwallow.cs
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.Mods.RA.Move;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
@@ -163,12 +164,15 @@ namespace OpenRA.Mods.RA
|
||||
nextScanTime = self.World.SharedRandom.Next(info.MinimumScanTimeInterval, info.MaximumScanTimeInterval);
|
||||
var inRange = self.World.FindActorsInCircle(self.CenterPosition, range);
|
||||
|
||||
var mobile = self.TraitOrDefault<Mobile>();
|
||||
return inRange
|
||||
.Where(a =>
|
||||
a.AppearsHostileTo(self) &&
|
||||
!a.HasTrait<AutoTargetIgnore>() &&
|
||||
attack.HasAnyValidWeapons(Target.FromActor(a)) &&
|
||||
self.Owner.Shroud.IsTargetable(a))
|
||||
a.AppearsHostileTo(self) &&
|
||||
!a.HasTrait<AutoTargetIgnore>() &&
|
||||
attack.HasAnyValidWeapons(Target.FromActor(a)) &&
|
||||
self.Owner.Shroud.IsTargetable(a) &&
|
||||
(!attack.Info.AttackRequiresEnteringCell || (mobile != null && mobile.MovementSpeedForCell(self, a.Location) != 0))
|
||||
)
|
||||
.ClosestTo(self);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user