Use TileSetRenderer in the editor.
This commit is contained in:
@@ -27,7 +27,7 @@ namespace OpenRA.Editor
|
||||
{
|
||||
// change the bits in the map
|
||||
var template = surface.TileSet.Templates[brushTemplate.N];
|
||||
var tile = template.Data;
|
||||
var tile = surface.TileSetRenderer.Data(brushTemplate.N);
|
||||
var pos = surface.GetBrushLocation();
|
||||
|
||||
if (surface.GetModifiers() == Keys.Shift)
|
||||
@@ -42,7 +42,7 @@ namespace OpenRA.Editor
|
||||
if (surface.Map.IsInMap(new CVec(u, v) + pos))
|
||||
{
|
||||
var z = u + v * template.Size.X;
|
||||
if (tile.TileBitmapBytes[z] != null)
|
||||
if (tile[z] != null)
|
||||
surface.Map.MapTiles.Value[u + pos.X, v + pos.Y] =
|
||||
new TileReference<ushort, byte>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user