From 694fb6831a4557c91bf7953d5c3e61e90909f720 Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 22 Sep 2010 12:03:45 +1200 Subject: [PATCH] fix target line on Move that has not yet calculated path --- OpenRA.Game/Traits/Activities/Move.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/OpenRA.Game/Traits/Activities/Move.cs b/OpenRA.Game/Traits/Activities/Move.cs index 094d5342b1..28e44e1e99 100755 --- a/OpenRA.Game/Traits/Activities/Move.cs +++ b/OpenRA.Game/Traits/Activities/Move.cs @@ -255,9 +255,11 @@ namespace OpenRA.Traits.Activities public override IEnumerable 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