Remove viewport editor-mode assumptions.

This commit is contained in:
Paul Chote
2015-06-16 08:16:49 +01:00
parent 6738b8b977
commit c44afc0722
3 changed files with 5 additions and 3 deletions

View File

@@ -24,7 +24,9 @@ namespace OpenRA.Graphics
theater = wr.Theater; theater = wr.Theater;
mapTiles = world.Map.MapTiles.Value; mapTiles = world.Map.MapTiles.Value;
terrain = new TerrainSpriteLayer(world, wr, theater.Sheet, BlendMode.Alpha, wr.Palette("terrain"), true); terrain = new TerrainSpriteLayer(world, wr, theater.Sheet, BlendMode.Alpha,
wr.Palette("terrain"), wr.World.Type != WorldType.Editor);
foreach (var cell in world.Map.AllCells) foreach (var cell in world.Map.AllCells)
UpdateCell(cell); UpdateCell(cell);

View File

@@ -261,7 +261,7 @@ namespace OpenRA.Graphics
{ {
if (cellsDirty) if (cellsDirty)
{ {
cells = CalculateVisibleCells(worldRenderer.World.Type != WorldType.Editor); cells = CalculateVisibleCells(false);
cellsDirty = false; cellsDirty = false;
} }

View File

@@ -146,7 +146,7 @@ namespace OpenRA.Mods.Common.Traits
Dirty.Clear(); Dirty.Clear();
foreach (var uv in wr.Viewport.VisibleCellsInsideBounds.MapCoords) foreach (var uv in wr.Viewport.AllVisibleCells.MapCoords)
{ {
var t = Tiles[uv]; var t = Tiles[uv];
if (t.Sprite != null) if (t.Sprite != null)