diff --git a/OpenRa.Game/MainWindow.cs b/OpenRa.Game/MainWindow.cs index 3aac970a29..1bd6bc1a06 100644 --- a/OpenRa.Game/MainWindow.cs +++ b/OpenRa.Game/MainWindow.cs @@ -89,8 +89,6 @@ namespace OpenRa.Game if (e.Button == MouseButtons.Left) { - //MoveOrder order = new MoveOrder(lastPos + viewport.Location); - //myUnit.Accept(order); int x = (int)( ( e.X + viewport.Location.X ) / 24 ); int y = (int)( ( e.Y + viewport.Location.Y ) / 24 ); myUnit.Order( x, y ).Apply(); diff --git a/OpenRa.Game/Mcv.cs b/OpenRa.Game/Mcv.cs index a825ef1ebe..b20891b64f 100644 --- a/OpenRa.Game/Mcv.cs +++ b/OpenRa.Game/Mcv.cs @@ -77,7 +77,7 @@ namespace OpenRa.Game if( currentOrder == null ) return; - if( float2.WithinEpsilon( renderLocation, currentOrder.Destination, 1.0f ) ) + if( float2.WithinEpsilon( location, currentOrder.Destination, 1.0f ) ) { currentOrder = null; return; @@ -99,6 +99,9 @@ namespace OpenRa.Game facing = ( facing + 1 ) % 32; renderLocation = location - new float2( 12, 12 ); // HACK: center mcv in it's cell + + renderLocation.X = (float)Math.Round( renderLocation.X ); + renderLocation.Y = (float)Math.Round( renderLocation.Y ); } public MoveOrder Order( int x, int y )