fix VoxelAnimation.DisableFunc being ignored

This commit is contained in:
Matthias Mailänder
2014-07-05 08:51:08 +02:00
parent 6734cd96a4
commit 7385fcbf3f

View File

@@ -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);
}