@@ -146,7 +146,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
Dirty.Clear();
|
||||
|
||||
foreach (var uv in wr.Viewport.VisibleCells.MapCoords)
|
||||
foreach (var uv in wr.Viewport.VisibleCellsInsideBounds.MapCoords)
|
||||
{
|
||||
var t = Tiles[uv];
|
||||
if (t.Sprite != null)
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
var layer = pair.Value;
|
||||
|
||||
// Only render quads in viewing range:
|
||||
foreach (var cell in wr.Viewport.VisibleCells)
|
||||
foreach (var cell in wr.Viewport.VisibleCellsInsideBounds)
|
||||
{
|
||||
if (layer[cell] <= 0)
|
||||
continue;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public void Render(WorldRenderer wr)
|
||||
{
|
||||
var shroudObscured = world.ShroudObscuresTest;
|
||||
foreach (var uv in wr.Viewport.VisibleCells.MapCoords)
|
||||
foreach (var uv in wr.Viewport.VisibleCellsInsideBounds.MapCoords)
|
||||
{
|
||||
if (shroudObscured(uv))
|
||||
continue;
|
||||
|
||||
@@ -189,8 +189,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (fogSprites.Any(s => s.BlendMode != fogBlend))
|
||||
throw new InvalidDataException("Fog sprites must all use the same blend mode.");
|
||||
|
||||
shroudLayer = new TerrainSpriteLayer(w, wr, shroudSheet, shroudBlend, wr.Palette(info.ShroudPalette));
|
||||
fogLayer = new TerrainSpriteLayer(w, wr, fogSheet, fogBlend, wr.Palette(info.FogPalette));
|
||||
shroudLayer = new TerrainSpriteLayer(w, wr, shroudSheet, shroudBlend, wr.Palette(info.ShroudPalette), false);
|
||||
fogLayer = new TerrainSpriteLayer(w, wr, fogSheet, fogBlend, wr.Palette(info.FogPalette), false);
|
||||
}
|
||||
|
||||
Edges GetEdges(MPos uv, Func<MPos, bool> isVisible)
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
foreach (var kv in tiles)
|
||||
{
|
||||
if (!wr.Viewport.VisibleCells.Contains(kv.Key))
|
||||
if (!wr.Viewport.VisibleCellsInsideBounds.Contains(kv.Key))
|
||||
continue;
|
||||
|
||||
if (world.ShroudObscures(kv.Key))
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
var colors = wr.World.TileSet.HeightDebugColors;
|
||||
var mouseCell = wr.Viewport.ViewToWorld(Viewport.LastMousePos).ToMPos(wr.World.Map);
|
||||
|
||||
foreach (var uv in wr.Viewport.VisibleCells.MapCoords)
|
||||
foreach (var uv in wr.Viewport.VisibleCellsInsideBounds.MapCoords)
|
||||
{
|
||||
var height = (int)map.MapHeight.Value[uv];
|
||||
var tile = map.MapTiles.Value[uv];
|
||||
|
||||
Reference in New Issue
Block a user