Merge pull request #4566 from Mailaender/raed-tile0

Added RAED tile ID 0 support
This commit is contained in:
Paul Chote
2014-02-07 10:11:22 +13:00
2 changed files with 9 additions and 1 deletions

View File

@@ -485,6 +485,11 @@ namespace OpenRA
for (var i = Bounds.Left; i < Bounds.Right; i++)
{
var tr = MapTiles.Value[i, j];
if (!tileset.Templates.ContainsKey(tr.Type))
{
Console.WriteLine("Unknown Tile ID {0}".F(tr.Type));
continue;
}
var template = tileset.Templates[tr.Type];
if (!template.PickAny)
continue;

View File

@@ -240,7 +240,10 @@ namespace OpenRA.Utility
for (int j = 0; j < mapSize; j++)
for (int i = 0; i < mapSize; i++)
map.MapTiles.Value[i, j].Type = ms.ReadUInt16();
{
var tileID = ms.ReadUInt16();
map.MapTiles.Value[i, j].Type = tileID == (ushort)0 ? (ushort)255 : tileID; // RAED weirdness
}
for (int j = 0; j < mapSize; j++)
for (int i = 0; i < mapSize; i++)