Check ITargetable when deciding target validity. Fixes #3659.

This commit is contained in:
Paul Chote
2013-08-18 17:15:22 +12:00
parent 8fd4243861
commit bc5c11e44f
26 changed files with 62 additions and 44 deletions

View File

@@ -161,7 +161,7 @@ namespace OpenRA.Traits
var c = Color.Green;
var wlr = Game.Renderer.WorldLineRenderer;
foreach (var stp in targets.Where(t => t.IsValid).Select(p => wr.ScreenPxPosition(p.CenterPosition)))
foreach (var stp in targets.Where(t => t.Type != TargetType.Invalid).Select(p => wr.ScreenPxPosition(p.CenterPosition)))
{
wlr.DrawLine(stp + new float2(-1, -1), stp + new float2(-1, 1), c, c);
wlr.DrawLine(stp + new float2(-1, 1), stp + new float2(1, 1), c, c);