Overhaul target line rendering:
- Targets are now defined by the activities - Queued activities are shown - Support custom attack colors
This commit is contained in:
@@ -297,8 +297,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return;
|
||||
|
||||
var targetLocation = move.NearestMoveableCell(cell);
|
||||
self.SetTargetLine(Target.FromCell(self.World, targetLocation), Color.Yellow);
|
||||
self.QueueActivity(order.Queued, new DeliverUnit(self, order.Target, Info.DropRange));
|
||||
self.ShowTargetLines();
|
||||
}
|
||||
else if (order.OrderString == "Unload")
|
||||
{
|
||||
@@ -316,8 +316,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!order.Queued)
|
||||
self.CancelActivity();
|
||||
|
||||
self.SetTargetLine(order.Target, Color.Yellow);
|
||||
self.QueueActivity(order.Queued, new PickupUnit(self, order.Target.Actor, Info.BeforeLoadDelay));
|
||||
self.ShowTargetLines();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user