Remove TargetActor and TargetLocation from order issuing.
This commit is contained in:
@@ -54,7 +54,7 @@ namespace OpenRA.Mods.Common.AI
|
||||
if (AttackOrFleeFuzzy.Default.CanAttack(owner.Units, enemyUnits))
|
||||
{
|
||||
foreach (var u in owner.Units)
|
||||
owner.Bot.QueueOrder(new Order("AttackMove", u, false) { TargetLocation = owner.TargetActor.Location });
|
||||
owner.Bot.QueueOrder(new Order("AttackMove", u, Target.FromCell(owner.World, owner.TargetActor.Location), false));
|
||||
|
||||
// We have gathered sufficient units. Attack the nearest enemy unit.
|
||||
owner.FuzzyStateMachine.ChangeState(owner, new GroundUnitsAttackMoveState(), true);
|
||||
@@ -100,7 +100,7 @@ namespace OpenRA.Mods.Common.AI
|
||||
// Let them regroup into tighter formation.
|
||||
owner.Bot.QueueOrder(new Order("Stop", leader, false));
|
||||
foreach (var unit in owner.Units.Where(a => !ownUnits.Contains(a)))
|
||||
owner.Bot.QueueOrder(new Order("AttackMove", unit, false) { TargetLocation = leader.Location });
|
||||
owner.Bot.QueueOrder(new Order("AttackMove", unit, Target.FromCell(owner.World, leader.Location), false));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -114,7 +114,7 @@ namespace OpenRA.Mods.Common.AI
|
||||
}
|
||||
else
|
||||
foreach (var a in owner.Units)
|
||||
owner.Bot.QueueOrder(new Order("AttackMove", a, false) { TargetLocation = owner.TargetActor.Location });
|
||||
owner.Bot.QueueOrder(new Order("AttackMove", a, Target.FromCell(owner.World, owner.TargetActor.Location), false));
|
||||
}
|
||||
|
||||
if (ShouldFlee(owner))
|
||||
@@ -147,7 +147,7 @@ namespace OpenRA.Mods.Common.AI
|
||||
|
||||
foreach (var a in owner.Units)
|
||||
if (!BusyAttack(a))
|
||||
owner.Bot.QueueOrder(new Order("Attack", a, false) { TargetActor = owner.TargetActor });
|
||||
owner.Bot.QueueOrder(new Order("Attack", a, Target.FromActor(owner.TargetActor), false));
|
||||
|
||||
if (ShouldFlee(owner))
|
||||
owner.FuzzyStateMachine.ChangeState(owner, new GroundUnitsFleeState(), true);
|
||||
|
||||
Reference in New Issue
Block a user