fix #1205 -- desync when AI builds harvs
This commit is contained in:
@@ -249,8 +249,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
BotDebug("AI: Found a newly built unit");
|
||||
if (a.Info == Rules.Info["harv"])
|
||||
a.QueueActivity(new FindResources());
|
||||
|
||||
world.IssueOrder( new Order( "Harvest", a, false ) );
|
||||
else
|
||||
unitsHangingAroundTheBase.Add(a);
|
||||
|
||||
|
||||
@@ -154,9 +154,12 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
var mobile = self.Trait<Mobile>();
|
||||
self.CancelActivity();
|
||||
self.QueueActivity(mobile.MoveTo(order.TargetLocation, 0));
|
||||
if (order.TargetLocation != int2.Zero)
|
||||
{
|
||||
self.QueueActivity(mobile.MoveTo(order.TargetLocation, 0));
|
||||
self.SetTargetLine(Target.FromOrder(order), Color.Red);
|
||||
}
|
||||
self.QueueActivity(new FindResources());
|
||||
self.SetTargetLine(Target.FromOrder(order), Color.Red);
|
||||
}
|
||||
else if (order.OrderString == "Deliver")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user