diff --git a/OpenRA.Game/Graphics/VoxelRenderable.cs b/OpenRA.Game/Graphics/VoxelRenderable.cs index 3d6fe80e4f..2d6686acae 100644 --- a/OpenRA.Game/Graphics/VoxelRenderable.cs +++ b/OpenRA.Game/Graphics/VoxelRenderable.cs @@ -1,6 +1,6 @@ #region Copyright & License Information /* - * Copyright 2007-2013 The OpenRA Developers (see AUTHORS) + * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) * This file is part of OpenRA, which is free software. It is made * available to you under the terms of the GNU General Public License * as published by the Free Software Foundation. For more information, @@ -89,8 +89,10 @@ namespace OpenRA.Graphics static readonly float[] groundNormal = new float[] {0,0,1,1}; public void BeforeRender(WorldRenderer wr) { + var draw = voxels.Where(v => v.DisableFunc == null || !v.DisableFunc()); + renderProxy = Game.Renderer.WorldVoxelRenderer.RenderAsync( - wr, voxels, camera, scale, groundNormal, lightSource, + wr, draw, camera, scale, groundNormal, lightSource, lightAmbientColor, lightDiffuseColor, palette, normalsPalette, shadowPalette); }