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 * When someone patches Ijw.DirectX, you need to do `git submodule update` in your OpenRA tree. This has so
far happened *once*. 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(); var p = queue.Pop();
cellInfo[ p.Location.X, p.Location.Y ].Seen = true; 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 ) foreach( int2 d in Util.directions )
{ {
int2 newHere = p.Location + d; int2 newHere = p.Location + d;
@@ -98,10 +102,12 @@ namespace OpenRa.Game
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 { var search = new PathSearch
{
heuristic = DefaultEstimator(target), heuristic = DefaultEstimator(target),
umt = umt, umt = umt,
checkForBlocked = checkForBlocked }; checkForBlocked = checkForBlocked
};
foreach (var sl in froms) foreach (var sl in froms)
search.AddInitialCell(sl); search.AddInitialCell(sl);
@@ -109,10 +115,6 @@ namespace OpenRa.Game
return search; return search;
} }
static CellInfo[ , ] InitCellInfo() static CellInfo[ , ] InitCellInfo()
{ {
var cellInfo = new CellInfo[ 128, 128 ]; var cellInfo = new CellInfo[ 128, 128 ];

View File

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