Obey order.Queued in DeployTransform. Fixes #4211.
This commit is contained in:
@@ -68,7 +68,7 @@ namespace OpenRA.Mods.RA
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeployTransform()
|
public void DeployTransform(bool queued)
|
||||||
{
|
{
|
||||||
var b = self.TraitOrDefault<Building>();
|
var b = self.TraitOrDefault<Building>();
|
||||||
|
|
||||||
@@ -79,6 +79,9 @@ namespace OpenRA.Mods.RA
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!queued)
|
||||||
|
self.CancelActivity();
|
||||||
|
|
||||||
if (self.HasTrait<IFacing>())
|
if (self.HasTrait<IFacing>())
|
||||||
self.QueueActivity(new Turn(Info.Facing));
|
self.QueueActivity(new Turn(Info.Facing));
|
||||||
|
|
||||||
@@ -92,7 +95,7 @@ namespace OpenRA.Mods.RA
|
|||||||
public void ResolveOrder( Actor self, Order order )
|
public void ResolveOrder( Actor self, Order order )
|
||||||
{
|
{
|
||||||
if (order.OrderString == "DeployTransform")
|
if (order.OrderString == "DeployTransform")
|
||||||
DeployTransform();
|
DeployTransform(order.Queued);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,8 @@ end
|
|||||||
|
|
||||||
Actor.DeployTransform = function(actor)
|
Actor.DeployTransform = function(actor)
|
||||||
Actor.CallFunc(actor, function()
|
Actor.CallFunc(actor, function()
|
||||||
Actor.Trait(actor, "Transforms"):DeployTransform()
|
-- Queue the transform order
|
||||||
|
Actor.Trait(actor, "Transforms"):DeployTransform(true)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user