Fix resupply not displaying target lines correctly

This commit is contained in:
abcdefg30
2020-05-18 10:32:05 +02:00
committed by tovl
parent 327d451abc
commit 8b13d3e4c7

View File

@@ -133,7 +133,7 @@ namespace OpenRA.Mods.Common.Activities
// HACK: Repairable needs the actor to move to host center.
// TODO: Get rid of this or at least replace it with something less hacky.
if (repairableNear == null)
QueueChild(move.MoveTo(targetCell));
QueueChild(move.MoveTo(targetCell, targetLineColor: Color.Green));
var delta = (self.CenterPosition - host.CenterPosition).LengthSquared;
var transport = transportCallers.FirstOrDefault(t => t.MinimumDistance.LengthSquared < delta);
@@ -222,7 +222,7 @@ namespace OpenRA.Mods.Common.Activities
{
if (rp != null && rp.Path.Count > 0)
foreach (var cell in rp.Path)
QueueChild(move.MoveTo(cell, 1, repairableNear != null ? null : host.Actor, true));
QueueChild(move.MoveTo(cell, 1, repairableNear != null ? null : host.Actor, true, Color.Green));
else if (repairableNear == null)
QueueChild(move.MoveToTarget(self, host));
}