changed ResourceLayer to work the same as BibLayer
This commit is contained in:
@@ -94,11 +94,9 @@ namespace OpenRA.Traits
|
|||||||
var t = new int2(x, y);
|
var t = new int2(x, y);
|
||||||
if (world.LocalPlayer != null && !world.LocalPlayer.Shroud.IsExplored(t) || tiles[x,y].type == 0) continue;
|
if (world.LocalPlayer != null && !world.LocalPlayer.Shroud.IsExplored(t) || tiles[x,y].type == 0) continue;
|
||||||
|
|
||||||
spriteRenderer.DrawSprite(bibSprites[tiles[x,y].type- 1][tiles[x,y].image],
|
spriteRenderer.DrawSprite(bibSprites[tiles[x, y].type - 1][tiles[x, y].image],
|
||||||
Game.CellSize * (float2)t, "terrain");
|
Game.CellSize * (float2)t, "terrain");
|
||||||
}
|
}
|
||||||
|
|
||||||
spriteRenderer.Flush();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,11 @@ namespace OpenRA.Traits
|
|||||||
{
|
{
|
||||||
var map = world.Map;
|
var map = world.Map;
|
||||||
|
|
||||||
for (int y = map.YOffset; y < map.YOffset + map.Height; y++)
|
var tl = world.Map.TopLeft;
|
||||||
for (int x = map.XOffset; x < map.XOffset + map.Width; x++)
|
var br = world.Map.BottomRight;
|
||||||
|
|
||||||
|
for (int x = tl.X; x < br.X; x++)
|
||||||
|
for (int y = tl.Y; y < br.Y; y++)
|
||||||
{
|
{
|
||||||
if (world.LocalPlayer != null && !world.LocalPlayer.Shroud.IsExplored(new int2(x, y))) continue;
|
if (world.LocalPlayer != null && !world.LocalPlayer.Shroud.IsExplored(new int2(x, y))) continue;
|
||||||
|
|
||||||
@@ -58,8 +61,6 @@ namespace OpenRA.Traits
|
|||||||
Game.CellSize * new int2(x, y),
|
Game.CellSize * new int2(x, y),
|
||||||
c.type.info.Palette);
|
c.type.info.Palette);
|
||||||
}
|
}
|
||||||
|
|
||||||
sr.Flush();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void WorldLoaded(World w)
|
public void WorldLoaded(World w)
|
||||||
|
|||||||
Reference in New Issue
Block a user