X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fitemdef.cpp;h=260baadc0ff67bdabd35cec29ebf528b5431bdee;hb=69bd803a3221bf02672431390e672b0510695254;hp=9ce064ea4e480df75184288f43a275d898d9c9ab;hpb=bee170570de7a796ac7b5ba6c0b39b253380b5e3;p=oweals%2Fminetest.git diff --git a/src/itemdef.cpp b/src/itemdef.cpp index 9ce064ea4..260baadc0 100644 --- a/src/itemdef.cpp +++ b/src/itemdef.cpp @@ -30,6 +30,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "tile.h" #endif #include "log.h" +#include "main.h" // g_settings +#include "settings.h" #include "util/serialize.h" #include "util/container.h" #include "util/thread.h" @@ -356,7 +358,10 @@ public: scene::IMesh *node_mesh = mapblock_mesh.getMesh(); assert(node_mesh); - setMeshColor(node_mesh, video::SColor(255, 255, 255, 255)); + video::SColor c(255, 255, 255, 255); + if(g_settings->getS32("enable_shaders") != 0) + c = MapBlock_LightColor(255, 0xffff, decode_light(f.light_source)); + setMeshColor(node_mesh, c); /* Scale and translate the mesh so it's a unit cube