Use FogObscures(WPos).

This commit is contained in:
Paul Chote
2015-06-07 19:28:39 +01:00
parent 66dd3c553c
commit 3994e1eec9
11 changed files with 13 additions and 24 deletions

View File

@@ -70,8 +70,8 @@ namespace OpenRA.Mods.RA.Graphics
public void RenderDebugGeometry(WorldRenderer wr) { }
public void Render(WorldRenderer wr)
{
if (wr.World.FogObscures(wr.World.Map.CellContaining(pos)) &&
wr.World.FogObscures(wr.World.Map.CellContaining(pos + length)))
if (wr.World.FogObscures(pos) &&
wr.World.FogObscures(pos + length))
return;
if (!cache.Any() || length != cachedLength || pos != cachedPos)