Merge branch 'master' of git@github.com:beedee/OpenRA

This commit is contained in:
Bob
2009-12-05 21:21:32 +13:00
3 changed files with 33 additions and 25 deletions

View File

@@ -27,3 +27,7 @@ Other Notes:
* When someone patches Ijw.DirectX, you need to do `git submodule update` in your OpenRA tree. This has so
far happened *once*.
* You'll also need the Visual C++ 2008 SP1 Redist. You can get this from Microsoft:
http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2

View File

@@ -32,6 +32,10 @@ namespace OpenRa.Game
var p = queue.Pop();
cellInfo[ p.Location.X, p.Location.Y ].Seen = true;
if (!ignoreTerrain)
if (passableCost[(int)umt][p.Location.X, p.Location.Y] == float.PositiveInfinity)
return p.Location;
foreach( int2 d in Util.directions )
{
int2 newHere = p.Location + d;
@@ -96,23 +100,21 @@ namespace OpenRa.Game
return search;
}
public static PathSearch FromPoints( IEnumerable<int2> froms, int2 target, UnitMovementType umt, bool checkForBlocked )
public static PathSearch FromPoints(IEnumerable<int2> froms, int2 target, UnitMovementType umt, bool checkForBlocked)
{
var search = new PathSearch {
heuristic = DefaultEstimator( target ),
var search = new PathSearch
{
heuristic = DefaultEstimator(target),
umt = umt,
checkForBlocked = checkForBlocked };
checkForBlocked = checkForBlocked
};
foreach( var sl in froms )
search.AddInitialCell( sl );
foreach (var sl in froms)
search.AddInitialCell(sl);
return search;
}
static CellInfo[ , ] InitCellInfo()
{
var cellInfo = new CellInfo[ 128, 128 ];

View File

@@ -1,15 +1,17 @@
rmdir /s /q ..\openra-bin
mkdir ..\openra-bin
copy *.mix ..\openra-bin\
copy *.ini ..\openra-bin\
copy *.rem ..\openra-bin\
copy *.til ..\openra-bin\
copy INSTALL ..\openra-bin\
copy LICENSE ..\openra-bin\
copy *.fx ..\openra-bin\
copy *.xml ..\openra-bin\
copy specialbin.png ..\openra-bin\
copy OpenRA.Server\bin\debug\OpenRA.Server ..\openra-bin\
copy SequenceEditor\bin\x86\debug\SequenceEditor.exe ..\openra-bin\
copy OpenRA.Game\bin\x86\debug\*.dll ..\openra-bin\
copy OpenRA.Game\bin\x86\debug\OpenRa.Game.exe ..\openra-bin\
@rmdir /s /q ..\openra-bin
@mkdir ..\openra-bin
@if "%1"=="--nomix" goto nomix
@copy *.mix ..\openra-bin\
:nomix
@copy *.ini ..\openra-bin\
@copy *.rem ..\openra-bin\
@copy *.til ..\openra-bin\
@copy INSTALL ..\openra-bin\
@copy LICENSE ..\openra-bin\
@copy *.fx ..\openra-bin\
@copy *.xml ..\openra-bin\
@copy specialbin.png ..\openra-bin\
@copy OpenRA.Server\bin\debug\OpenRA.Server.exe ..\openra-bin\
@copy SequenceEditor\bin\x86\debug\SequenceEditor.exe ..\openra-bin\
@copy OpenRA.Game\bin\x86\debug\*.dll ..\openra-bin\
@copy OpenRA.Game\bin\x86\debug\OpenRa.Game.exe ..\openra-bin\