diff --git a/OpenRA.Editor/BrushTool.cs b/OpenRA.Editor/BrushTool.cs index fed80f5fa1..9a20c1db6c 100644 --- a/OpenRA.Editor/BrushTool.cs +++ b/OpenRA.Editor/BrushTool.cs @@ -47,8 +47,7 @@ namespace OpenRA.Editor new TileReference { type = Brush.N, - index = template.PickAny ? byte.MaxValue : (byte)z, - image = template.PickAny ? (byte)((u + pos.X) % 4 + ((v + pos.Y) % 4) * 4) : (byte)z, + index = template.PickAny ? (byte)((u + pos.X) % 4 + ((v + pos.Y) % 4) * 4) : (byte)z, }; var ch = new int2((pos.X + u) / Surface.ChunkSize, (pos.Y + v) / Surface.ChunkSize); @@ -97,7 +96,7 @@ namespace OpenRA.Editor for (var x = a.X; x <= b.X; x++) { - s.Map.MapTiles[x, p.Y] = new TileReference { type = Brush.N, image = (byte)0, index = (byte)0 }; + s.Map.MapTiles[x, p.Y] = new TileReference { type = Brush.N, index = (byte)0 }; if (s.Map.MapTiles[x, p.Y - 1].Equals(replace)) MaybeEnqueue(x, p.Y - 1); if (s.Map.MapTiles[x, p.Y + 1].Equals(replace)) diff --git a/OpenRA.Editor/ResourceTool.cs b/OpenRA.Editor/ResourceTool.cs index 9a2a92d2db..fe199f5885 100644 --- a/OpenRA.Editor/ResourceTool.cs +++ b/OpenRA.Editor/ResourceTool.cs @@ -27,8 +27,7 @@ namespace OpenRA.Editor = new TileReference { type = (byte)Resource.Info.ResourceType, - index = (byte)random.Next(Resource.Info.SpriteNames.Length), - image = (byte)Resource.Value + index = (byte)Resource.Value }; var ch = new int2((surface.GetBrushLocation().X) / Surface.ChunkSize, diff --git a/OpenRA.Editor/Surface.cs b/OpenRA.Editor/Surface.cs index 52a1df208f..70521291a4 100755 --- a/OpenRA.Editor/Surface.cs +++ b/OpenRA.Editor/Surface.cs @@ -214,7 +214,7 @@ namespace OpenRA.Editor { var tr = Map.MapTiles[u * ChunkSize + i, v * ChunkSize + j]; var tile = TileSet.Tiles[tr.type]; - var index = (tr.image < tile.TileBitmapBytes.Count) ? tr.image : (byte)0; + var index = (tr.index < tile.TileBitmapBytes.Count) ? tr.index : (byte)0; var rawImage = tile.TileBitmapBytes[index]; for (var x = 0; x < TileSet.TileSize; x++) for (var y = 0; y < TileSet.TileSize; y++)