Fix after hardware node coloring (#5114)
authorDániel Juhász <juhdanad@gmail.com>
Thu, 26 Jan 2017 15:10:56 +0000 (16:10 +0100)
committerZeno- <kde.psych@gmail.com>
Thu, 26 Jan 2017 15:10:56 +0000 (01:10 +1000)
src/mapblock_mesh.cpp
src/particles.h

index 0744cd527d4bdff6dade3ac0b1b635ee019e6809..79d02d6ff035582c5d1eb98e7b4ddb5dcd282d87 100644 (file)
@@ -1090,10 +1090,10 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data, v3s16 camera_offset):
                                brightness of vertices 1 and 3 differ less than
                                the brightness of vertices 0 and 2.
                        */
-                       if (abs(f.vertices[0].Color.getAverage()
-                                       - f.vertices[2].Color.getAverage())
-                                       > abs(f.vertices[1].Color.getAverage()
-                                       - f.vertices[3].Color.getAverage()))
+                       if (abs(f.vertices[0].Color.getLuminance()
+                                       - f.vertices[2].Color.getLuminance())
+                                       > abs(f.vertices[1].Color.getLuminance()
+                                       - f.vertices[3].Color.getLuminance()))
                                indices_p = indices_alternate;
 
                        collector.append(f.tile, f.vertices, 4, indices_p, 6);
index 3177f2cfd2e87e07ccaabe93535d0ec6de342c11..7ffb1c72826ae88dbece777bd110e853c7b7bb02 100644 (file)
@@ -32,8 +32,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 struct ClientEvent;
 class ParticleManager;
 class ClientEnvironment;
-class MapNode;
-class ContentFeatures;
+struct MapNode;
+struct ContentFeatures;
 
 class Particle : public scene::ISceneNode
 {