Skip to content

Commit

Permalink
Fix map preview generation for isometric terrain
Browse files Browse the repository at this point in the history
  • Loading branch information
abcdefg30 committed Mar 8, 2019
1 parent eadbc73 commit d86267d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions OpenRA.Game/Map/Map.cs
Expand Up @@ -695,16 +695,16 @@ public byte[] SavePreview()
var dx = uv.V & 1;
if (x + dx > 0)
{
var z = y * stride + 8 * x + dx - 4;
var z = y * stride + 8 * x + 4 * dx - 4;
minimapData[z++] = leftColor.R;
minimapData[z++] = leftColor.G;
minimapData[z++] = leftColor.B;
minimapData[z++] = leftColor.A;
}

if (2 * x + dx < stride)
if (8 * x + 4 * dx < stride)
{
var z = y * stride + 8 * x + dx;
var z = y * stride + 8 * x + 4 * dx;
minimapData[z++] = rightColor.R;
minimapData[z++] = rightColor.G;
minimapData[z++] = rightColor.B;
Expand Down

0 comments on commit d86267d

Please sign in to comment.