summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDániel Juhász <juhdanad@gmail.com>2017-01-26 16:10:56 +0100
committerZeno- <kde.psych@gmail.com>2017-01-27 01:10:56 +1000
commitc268db7b46645b8000bd77ce80e919080a75f152 (patch)
tree58561dcf5fc20da6183454cf3d686cf40a32536c
parent9f108b56d35cb607b538562ac369c457cd129eaa (diff)
downloadminetest-c268db7b46645b8000bd77ce80e919080a75f152.tar.gz
minetest-c268db7b46645b8000bd77ce80e919080a75f152.tar.bz2
minetest-c268db7b46645b8000bd77ce80e919080a75f152.zip
Fix after hardware node coloring (#5114)
-rw-r--r--src/mapblock_mesh.cpp8
-rw-r--r--src/particles.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index 0744cd527..79d02d6ff 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -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);
diff --git a/src/particles.h b/src/particles.h
index 3177f2cfd..7ffb1c728 100644
--- a/src/particles.h
+++ b/src/particles.h
@@ -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
{