From 7385fcbf3f1aeb8326c168d06df33c0e7eaeed68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 5 Jul 2014 08:51:08 +0200 Subject: [PATCH] fix VoxelAnimation.DisableFunc being ignored --- OpenRA.Game/Graphics/VoxelRenderable.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); }