fix bogus target lines being drawn to 0,0

This commit is contained in:
Chris Forbes
2010-10-08 21:04:31 +13:00
parent a065fb464e
commit 1feb377d43

View File

@@ -53,6 +53,9 @@ namespace OpenRA.Traits
if ((lifetime <= 0 || --lifetime <= 0) && !force) if ((lifetime <= 0 || --lifetime <= 0) && !force)
return; return;
if (!target.IsValid)
return;
var p = target.CenterLocation; var p = target.CenterLocation;
Game.Renderer.LineRenderer.DrawLine(self.CenterLocation, p, c, c); Game.Renderer.LineRenderer.DrawLine(self.CenterLocation, p, c, c);