Merge pull request #8295 from obrakmann/fix8291_tesla_zap_in_fog

Fix tesla zaps being visible under the fog
This commit is contained in:
Matthias Mailänder
2015-05-31 09:00:36 +02:00

View File

@@ -70,6 +70,10 @@ 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)))
return;
if (!cache.Any() || length != cachedLength || pos != cachedPos)
cache = GenerateRenderables(wr);