Work around the "BUG: in order targeter" game chat warning.
This commit is contained in:
@@ -84,9 +84,16 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
public Order IssueOrder(Actor self, IOrderTargeter order, Target target, bool queued)
|
||||
{
|
||||
if (order.OrderID == "PortableChronoDeploy" && CanTeleport)
|
||||
if (order.OrderID == "PortableChronoDeploy")
|
||||
{
|
||||
// HACK: Switch the global order generator instead of actually issuing an order
|
||||
if (CanTeleport)
|
||||
self.World.OrderGenerator = new PortableChronoOrderGenerator(self, Info);
|
||||
|
||||
// HACK: We need to issue a fake order to stop the game complaining about the bodge above
|
||||
return new Order(order.OrderID, self, Target.Invalid, queued);
|
||||
}
|
||||
|
||||
if (order.OrderID == "PortableChronoTeleport")
|
||||
return new Order(order.OrderID, self, target, queued);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user