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");
|
BotDebug("AI: Found a newly built unit");
|
||||||
if (a.Info == Rules.Info["harv"])
|
if (a.Info == Rules.Info["harv"])
|
||||||
a.QueueActivity(new FindResources());
|
world.IssueOrder( new Order( "Harvest", a, false ) );
|
||||||
|
|
||||||
else
|
else
|
||||||
unitsHangingAroundTheBase.Add(a);
|
unitsHangingAroundTheBase.Add(a);
|
||||||
|
|
||||||
|
|||||||
@@ -154,9 +154,12 @@ namespace OpenRA.Mods.RA
|
|||||||
{
|
{
|
||||||
var mobile = self.Trait<Mobile>();
|
var mobile = self.Trait<Mobile>();
|
||||||
self.CancelActivity();
|
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.QueueActivity(new FindResources());
|
||||||
self.SetTargetLine(Target.FromOrder(order), Color.Red);
|
|
||||||
}
|
}
|
||||||
else if (order.OrderString == "Deliver")
|
else if (order.OrderString == "Deliver")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user