Rename IMovement -> IMove; Move GetCurrentPath from Mobile to IMove and implement for aircraft; fix regressions in Helicopter (ITick) and remove unused cruft from Aircraft (IOccupySpace).

This commit is contained in:
Paul Chote
2010-06-23 14:54:24 +12:00
parent 3be5b946ad
commit 7d717592c7
15 changed files with 46 additions and 35 deletions

View File

@@ -236,18 +236,15 @@ namespace OpenRA.Graphics
if (Game.Settings.PathDebug)
{
var mobile = selectedUnit.traits.GetOrDefault<Mobile>();
var mobile = selectedUnit.traits.WithInterface<IMove>().FirstOrDefault();
if (mobile != null)
{
var path = mobile.GetCurrentPath();
var start = selectedUnit.Location;
var path = mobile.GetCurrentPath(selectedUnit);
var start = selectedUnit.CenterLocation;
foreach (var step in path)
{
lineRenderer.DrawLine(
Game.CellSize * start + new float2(12, 12),
Game.CellSize * step + new float2(12, 12),
Color.Red, Color.Red);
lineRenderer.DrawLine(start, step, Color.Red, Color.Red);
start = step;
}
}