Overhaul target line rendering:
- Targets are now defined by the activities - Queued activities are shown - Support custom attack colors
This commit is contained in:
@@ -103,7 +103,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
var exit = CPos.Zero;
|
||||
var exitLocation = CPos.Zero;
|
||||
var target = Target.Invalid;
|
||||
|
||||
var info = (ProductionParadropInfo)Info;
|
||||
var actorType = info.ActorType;
|
||||
@@ -124,7 +123,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
var initialFacing = exitinfo.Facing < 0 ? (to - spawn).Yaw.Facing : exitinfo.Facing;
|
||||
|
||||
exitLocation = rp.Value != null ? rp.Value.Location : exit;
|
||||
target = Target.FromCell(self.World, exitLocation);
|
||||
|
||||
td.Add(new LocationInit(exit));
|
||||
td.Add(new CenterPositionInit(spawn));
|
||||
@@ -149,8 +147,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
}
|
||||
|
||||
newUnit.SetTargetLine(target, rp.Value != null ? Color.Red : Color.Green, false);
|
||||
|
||||
if (!self.IsDead)
|
||||
foreach (var t in self.TraitsImplementing<INotifyProduction>())
|
||||
t.UnitProduced(self, newUnit, exit);
|
||||
|
||||
Reference in New Issue
Block a user