Fixed bug where units left influence behind in some circumstances.
This commit is contained in:
@@ -249,9 +249,8 @@ namespace OpenRa.Game.Traits
|
|||||||
var nextCell = parent.path[ parent.path.Count - 1 ];
|
var nextCell = parent.path[ parent.path.Count - 1 ];
|
||||||
if( ( nextCell - mobile.toCell ) != ( mobile.toCell - mobile.fromCell ) )
|
if( ( nextCell - mobile.toCell ) != ( mobile.toCell - mobile.fromCell ) )
|
||||||
{
|
{
|
||||||
if( !CanEnterCell( nextCell, self ) )
|
if( CanEnterCell( nextCell, self ) )
|
||||||
return null;
|
{
|
||||||
|
|
||||||
parent.path.RemoveAt( parent.path.Count - 1 );
|
parent.path.RemoveAt( parent.path.Count - 1 );
|
||||||
|
|
||||||
var ret = new MoveFirstHalf(
|
var ret = new MoveFirstHalf(
|
||||||
@@ -266,6 +265,7 @@ namespace OpenRa.Game.Traits
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
var ret2 = new MoveSecondHalf(
|
var ret2 = new MoveSecondHalf(
|
||||||
BetweenCells( mobile.fromCell, mobile.toCell ),
|
BetweenCells( mobile.fromCell, mobile.toCell ),
|
||||||
CenterOfCell( mobile.toCell ),
|
CenterOfCell( mobile.toCell ),
|
||||||
|
|||||||
Reference in New Issue
Block a user