Return a synthesized tile for missing indices. Fixes #3329.
This commit is contained in:
@@ -148,7 +148,11 @@ namespace OpenRA.FileFormats
|
|||||||
{
|
{
|
||||||
TileTemplate tile;
|
TileTemplate tile;
|
||||||
if (Templates.TryGetValue(r.type, out tile))
|
if (Templates.TryGetValue(r.type, out tile))
|
||||||
return tile.Data.TileBitmapBytes[r.index];
|
{
|
||||||
|
var data = tile.Data.TileBitmapBytes[r.index];
|
||||||
|
if (data != null)
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
byte[] missingTile = new byte[TileSize*TileSize];
|
byte[] missingTile = new byte[TileSize*TileSize];
|
||||||
for (var i = 0; i < missingTile.Length; i++)
|
for (var i = 0; i < missingTile.Length; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user