Overhaul target line rendering:
- Targets are now defined by the activities - Queued activities are shown - Support custom attack colors
This commit is contained in:
@@ -141,8 +141,8 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
if (order.OrderString == "DetonateAttack")
|
||||
{
|
||||
self.SetTargetLine(order.Target, Color.Red);
|
||||
self.QueueActivity(order.Queued, new DetonationSequence(self, this, order.Target));
|
||||
self.ShowTargetLines();
|
||||
}
|
||||
else if (order.OrderString == "Detonate")
|
||||
self.QueueActivity(order.Queued, new DetonationSequence(self, this));
|
||||
@@ -248,6 +248,11 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
});
|
||||
}
|
||||
|
||||
public override IEnumerable<TargetLineNode> TargetLineNodes(Actor self)
|
||||
{
|
||||
yield return new TargetLineNode(target, Color.Crimson);
|
||||
}
|
||||
|
||||
void EjectDriver()
|
||||
{
|
||||
var driver = self.World.CreateActor(mad.info.DriverActor.ToLowerInvariant(), new TypeDictionary
|
||||
|
||||
Reference in New Issue
Block a user