Add missing target lines.

This commit is contained in:
tovl
2019-08-08 14:27:24 +02:00
committed by abcdefg30
parent daa82d113e
commit c0d5cd750d
5 changed files with 16 additions and 4 deletions

View File

@@ -10,8 +10,10 @@
#endregion
using System;
using System.Collections.Generic;
using OpenRA.Activities;
using OpenRA.Mods.Common.Traits;
using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.Common.Activities
@@ -93,12 +95,21 @@ namespace OpenRA.Mods.Common.Activities
if (!aircraft.Info.VTOL && assignTargetOnFirstRun)
return true;
QueueChild(new AttackMoveActivity(self, () => move.MoveToTarget(self, target)));
QueueChild(new AttackMoveActivity(self, () => move.MoveToTarget(self, target, targetLineColor: Color.OrangeRed)));
moveToRallyPoint = false;
return false;
}
return true;
}
public override IEnumerable<TargetLineNode> TargetLineNodes(Actor self)
{
if (ChildActivity == null && moveToRallyPoint)
yield return new TargetLineNode(target, Color.OrangeRed);
else
foreach (var n in ChildActivity.TargetLineNodes(self))
yield return n;
}
}
}