git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1316 993157c7-ee19-0410-b2c4-bb4e9862e678

This commit is contained in:
(no author)
2007-07-21 03:14:48 +00:00
parent c4267e2241
commit cb7b5dedd7
4 changed files with 10 additions and 4 deletions

View File

@@ -31,8 +31,7 @@ namespace OpenRa.Game
public List<int2> FindUnitPath( World world, Unit unit, DestinationFunc estimator )
{
int2 offset = new int2( map.XOffset, map.YOffset );
int2 startLocation = unit.Location + offset;
int2 startLocation = unit.Location + map.Offset;
CellInfo[ , ] cellInfo = new CellInfo[ 128, 128 ];
@@ -40,7 +39,7 @@ namespace OpenRa.Game
for( int y = 0 ; y < 128 ; y++ )
cellInfo[ x, y ] = new CellInfo( double.PositiveInfinity, new int2( x, y ), false );
return FindUnitPath( startLocation, estimator, offset, cellInfo );
return FindUnitPath( startLocation, estimator, map.Offset, cellInfo );
}
List<int2> FindUnitPath( int2 startLocation, DestinationFunc estimator, int2 offset, CellInfo[,] cellInfo )