Fix AI attacking
This commit is contained in:
@@ -180,11 +180,10 @@ namespace OpenRA.Mods.RA
|
|||||||
attackForce.RemoveAll(a => a.Destroyed);
|
attackForce.RemoveAll(a => a.Destroyed);
|
||||||
activeProductionBuildings.RemoveAll(a => a.Destroyed);
|
activeProductionBuildings.RemoveAll(a => a.Destroyed);
|
||||||
|
|
||||||
//don't select harvesters.
|
// don't select harvesters.
|
||||||
var newUnits = self.World.Queries.OwnedBy[p]
|
var newUnits = self.World.Queries.OwnedBy[p]
|
||||||
.Where(a => (a.Info.Traits.Contains<IMove>()
|
.Where(a => a.HasTrait<IMove>() && a.Info != Rules.Info["harv"]
|
||||||
&& a.Info != Rules.Info["harv"]
|
&& !activeUnits.Contains(a)).ToArray();
|
||||||
&& !activeUnits.Contains(a))).ToArray();
|
|
||||||
|
|
||||||
foreach (var a in newUnits)
|
foreach (var a in newUnits)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user