fix target line on Move that has not yet calculated path

This commit is contained in:
Bob
2010-09-22 12:03:45 +12:00
parent c16a515224
commit 694fb6831a

View File

@@ -255,9 +255,11 @@ namespace OpenRA.Traits.Activities
public override IEnumerable<float2> GetCurrentPath()
{
if( path == null )
return new float2[ 0 ];
return Enumerable.Reverse(path).Select( c => Util.CenterOfCell(c) );
if( path != null )
return Enumerable.Reverse(path).Select( c => Util.CenterOfCell(c) );
if( destination != null )
return new float2[] { destination.Value };
return new float2[ 0 ];
}
abstract class MovePart : IActivity