Include additional preview to prevent cutoff.
Fun fact: The original TS sidestepped this issue by rendering everything outside the cordon, which looks much worse than what we do here.
This commit is contained in:
@@ -22,8 +22,12 @@ namespace OpenRA.Graphics
|
||||
{
|
||||
var isDiamond = map.TileShape == TileShape.Diamond;
|
||||
var b = map.Bounds;
|
||||
|
||||
// Fudge the heightmap offset by adding as much extra as we need / can.
|
||||
// This tries to correct for our incorrect assumption that MPos == PPos
|
||||
var heightOffset = Math.Min(map.MaximumTerrainHeight, map.MapSize.Y - b.Bottom);
|
||||
var width = b.Width;
|
||||
var height = b.Height;
|
||||
var height = b.Height + heightOffset;
|
||||
|
||||
var bitmapWidth = width;
|
||||
if (isDiamond)
|
||||
@@ -59,6 +63,7 @@ namespace OpenRA.Graphics
|
||||
if (x + dx > 0)
|
||||
colors[y * stride + 2 * x + dx - 1] = leftColor.ToArgb();
|
||||
|
||||
if (2 * x + dx < stride)
|
||||
colors[y * stride + 2 * x + dx] = rightColor.ToArgb();
|
||||
}
|
||||
else
|
||||
@@ -78,8 +83,12 @@ namespace OpenRA.Graphics
|
||||
var terrain = new Bitmap(terrainBitmap);
|
||||
var isDiamond = map.TileShape == TileShape.Diamond;
|
||||
var b = map.Bounds;
|
||||
|
||||
// Fudge the heightmap offset by adding as much extra as we need / can
|
||||
// This tries to correct for our incorrect assumption that MPos == PPos
|
||||
var heightOffset = Math.Min(map.MaximumTerrainHeight, map.MapSize.Y - b.Bottom);
|
||||
var width = b.Width;
|
||||
var height = b.Height;
|
||||
var height = b.Height + heightOffset;
|
||||
|
||||
var resources = resourceRules.Actors["world"].Traits.WithInterface<ResourceTypeInfo>()
|
||||
.ToDictionary(r => r.ResourceType, r => r.TerrainType);
|
||||
@@ -111,6 +120,7 @@ namespace OpenRA.Graphics
|
||||
if (x + dx > 0)
|
||||
colors[y * stride + 2 * x + dx - 1] = color;
|
||||
|
||||
if (2 * x + dx < stride)
|
||||
colors[y * stride + 2 * x + dx] = color;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user