fix sub-model colors not being applied when using non-lit chunk vertex generation

This commit is contained in:
Gered 2013-12-01 15:14:49 -05:00
parent c027343c5d
commit 0fd5b2d18c

View file

@ -178,7 +178,14 @@ public class ChunkVertexGenerator {
// copy vertices
for (int i = 0; i < numVertices; ++i) {
sourceVertices.getVertex(vertex);
vertex.color.set(color); // TODO: the getVertex() call above sets this, we're just overriding here... kind of wasteful .. ?
// TODO: need to play with vertex/mesh color combinations a bit more to see if this is really correct
vertex.color.set(
vertex.color.r * color.r,
vertex.color.g * color.g,
vertex.color.b * color.b,
vertex.color.a * color.a
);
// transform if applicable... (this will probably just be per-tile rotation)
if (transform != null) {