don't just crash when map IDs are missing

spit out a warning
This commit is contained in:
Matthias Mailänder
2014-02-04 21:21:30 +01:00
parent 6f3617361e
commit 6bf66fbfc4

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;