tabify
This commit is contained in:
@@ -309,20 +309,20 @@ namespace OpenRA.Mods.RA
|
||||
}
|
||||
|
||||
// If we have any attackers, let them scan for enemy units and stop and regroup if they spot any
|
||||
if (attackForce.Count > 0 )
|
||||
if (attackForce.Count > 0)
|
||||
{
|
||||
bool foundEnemy = false;
|
||||
foreach (var a1 in attackForce)
|
||||
{
|
||||
var enemyUnits = world.FindUnitsInCircle(a1.CenterLocation, Game.CellSize * 10)
|
||||
.Where(unit => IsHumanPlayer(unit.Owner) ).ToList();
|
||||
.Where(unit => IsHumanPlayer(unit.Owner)).ToList();
|
||||
|
||||
if (enemyUnits.Count > 0)
|
||||
{
|
||||
//BotDebug("Found enemy "+enemyUnits.First().Info.Name);
|
||||
// Found enemy units nearby.
|
||||
foundEnemy = true;
|
||||
var enemy = enemyUnits.OrderBy( e => (e.Location - a1.Location).LengthSquared ).First();
|
||||
var enemy = enemyUnits.OrderBy(e => (e.Location - a1.Location).LengthSquared).First();
|
||||
|
||||
// Check how many own units we have gathered nearby...
|
||||
var ownUnits = world.FindUnitsInCircle(a1.CenterLocation, Game.CellSize * 2)
|
||||
|
||||
Reference in New Issue
Block a user