changed ResourceLayer to work the same as BibLayer
This commit is contained in:
@@ -86,19 +86,17 @@ namespace OpenRA.Traits
|
||||
public void Render()
|
||||
{
|
||||
var tl = world.Map.TopLeft;
|
||||
var br = world.Map.BottomRight;
|
||||
|
||||
for (int x = tl.X; x < br.X; x++)
|
||||
for (int y = tl.Y; y < br.Y; y++)
|
||||
var br = world.Map.BottomRight;
|
||||
|
||||
for (int x = tl.X; x < br.X; x++)
|
||||
for (int y = tl.Y; y < br.Y; y++)
|
||||
{
|
||||
var t = new int2(x, y);
|
||||
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],
|
||||
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],
|
||||
Game.CellSize * (float2)t, "terrain");
|
||||
}
|
||||
|
||||
spriteRenderer.Flush();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,8 +47,11 @@ namespace OpenRA.Traits
|
||||
{
|
||||
var map = world.Map;
|
||||
|
||||
for (int y = map.YOffset; y < map.YOffset + map.Height; y++)
|
||||
for (int x = map.XOffset; x < map.XOffset + map.Width; x++)
|
||||
var tl = world.Map.TopLeft;
|
||||
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;
|
||||
|
||||
@@ -58,8 +61,6 @@ namespace OpenRA.Traits
|
||||
Game.CellSize * new int2(x, y),
|
||||
c.type.info.Palette);
|
||||
}
|
||||
|
||||
sr.Flush();
|
||||
}
|
||||
|
||||
public void WorldLoaded(World w)
|
||||
|
||||
Reference in New Issue
Block a user