Fix a few spelling errors
This commit is contained in:
@@ -92,7 +92,7 @@ namespace OpenRA.FileFormats
|
|||||||
/// A fast (native) CRC32 implementation that can be used on a regular byte arrays.
|
/// A fast (native) CRC32 implementation that can be used on a regular byte arrays.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data">The data from which to calculate the checksum.</param>
|
/// <param name="data">The data from which to calculate the checksum.</param>
|
||||||
/// <param name="polynomial">The polynomal.</param>
|
/// <param name="polynomial">The polynomial.</param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// The calculated checksum.
|
/// The calculated checksum.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ namespace OpenRA
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Returns true if played successfully
|
// Returns true if played successfully
|
||||||
public static bool PlayPredefined(Player p, Actor voicedUnit, string type, string definition, string variant, bool attentuateVolume)
|
public static bool PlayPredefined(Player p, Actor voicedUnit, string type, string definition, string variant, bool attenuateVolume)
|
||||||
{
|
{
|
||||||
if (definition == null) return false;
|
if (definition == null) return false;
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ namespace OpenRA
|
|||||||
if (!String.IsNullOrEmpty(name) && (p == null || p == p.World.LocalPlayer))
|
if (!String.IsNullOrEmpty(name) && (p == null || p == p.World.LocalPlayer))
|
||||||
soundEngine.Play2D(sounds[name],
|
soundEngine.Play2D(sounds[name],
|
||||||
false, true, WPos.Zero,
|
false, true, WPos.Zero,
|
||||||
InternalSoundVolume, attentuateVolume);
|
InternalSoundVolume, attenuateVolume);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -621,12 +621,12 @@ namespace OpenRA.Mods.RA.AI
|
|||||||
|
|
||||||
foreach (var b in allEnemyBaseBuilder)
|
foreach (var b in allEnemyBaseBuilder)
|
||||||
{
|
{
|
||||||
var enemys = world.FindActorsInCircle(b.CenterPosition, WRange.FromCells(15))
|
var enemies = world.FindActorsInCircle(b.CenterPosition, WRange.FromCells(15))
|
||||||
.Where(unit => p.Stances[unit.Owner] == Stance.Enemy && unit.HasTrait<AttackBase>()).ToList();
|
.Where(unit => p.Stances[unit.Owner] == Stance.Enemy && unit.HasTrait<AttackBase>()).ToList();
|
||||||
|
|
||||||
if (rushFuzzy.CanAttack(ownUnits, enemys))
|
if (rushFuzzy.CanAttack(ownUnits, enemies))
|
||||||
{
|
{
|
||||||
var target = enemys.Any() ? enemys.Random(random) : b;
|
var target = enemies.Any() ? enemies.Random(random) : b;
|
||||||
var rush = GetSquadOfType(SquadType.Rush);
|
var rush = GetSquadOfType(SquadType.Rush);
|
||||||
if (rush == null)
|
if (rush == null)
|
||||||
rush = RegisterNewSquad(SquadType.Rush, target);
|
rush = RegisterNewSquad(SquadType.Rush, target);
|
||||||
@@ -781,16 +781,16 @@ namespace OpenRA.Mods.RA.AI
|
|||||||
{
|
{
|
||||||
var pos = new CPos(i, j);
|
var pos = new CPos(i, j);
|
||||||
var targets = world.FindActorsInCircle(pos.CenterPosition, WRange.FromCells(radiusOfPower)).ToList();
|
var targets = world.FindActorsInCircle(pos.CenterPosition, WRange.FromCells(radiusOfPower)).ToList();
|
||||||
var enemys = targets.Where(unit => p.Stances[unit.Owner] == Stance.Enemy).ToList();
|
var enemies = targets.Where(unit => p.Stances[unit.Owner] == Stance.Enemy).ToList();
|
||||||
var ally = targets.Where(unit => p.Stances[unit.Owner] == Stance.Ally || unit.Owner == p).ToList();
|
var ally = targets.Where(unit => p.Stances[unit.Owner] == Stance.Ally || unit.Owner == p).ToList();
|
||||||
|
|
||||||
if (enemys.Count < ally.Count || !enemys.Any())
|
if (enemies.Count < ally.Count || !enemies.Any())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (enemys.Count > countUnits)
|
if (enemies.Count > countUnits)
|
||||||
{
|
{
|
||||||
countUnits = enemys.Count;
|
countUnits = enemies.Count;
|
||||||
resLoc = enemys.Random(random).Location;
|
resLoc = enemies.Random(random).Location;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,9 +93,9 @@ namespace OpenRA.Mods.RA.AI
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var enemys = owner.world.FindActorsInCircle(leader.CenterPosition, WRange.FromCells(12))
|
var enemies = owner.world.FindActorsInCircle(leader.CenterPosition, WRange.FromCells(12))
|
||||||
.Where(a1 => !a1.Destroyed && !a1.IsDead()).ToList();
|
.Where(a1 => !a1.Destroyed && !a1.IsDead()).ToList();
|
||||||
var enemynearby = enemys.Where(a1 => a1.HasTrait<ITargetable>() && leader.Owner.Stances[a1.Owner] == Stance.Enemy).ToList();
|
var enemynearby = enemies.Where(a1 => a1.HasTrait<ITargetable>() && leader.Owner.Stances[a1.Owner] == Stance.Enemy).ToList();
|
||||||
if (enemynearby.Any())
|
if (enemynearby.Any())
|
||||||
{
|
{
|
||||||
owner.Target = enemynearby.ClosestTo(leader.CenterPosition);
|
owner.Target = enemynearby.ClosestTo(leader.CenterPosition);
|
||||||
|
|||||||
Reference in New Issue
Block a user