summaryrefslogtreecommitdiff
path: root/src/content_mapblock.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-04-08 04:01:12 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-04-08 04:01:12 +0300
commitd8edd3d0c87aeb5fcff4859a151e478f6f93932e (patch)
tree8bbe889ebfa6caa164e2b3181a131cece71f5d5e /src/content_mapblock.cpp
parent1b078efd5fe3a80011339f90df06e5f55fdbadf3 (diff)
downloadminetest-d8edd3d0c87aeb5fcff4859a151e478f6f93932e.tar.gz
minetest-d8edd3d0c87aeb5fcff4859a151e478f6f93932e.tar.bz2
minetest-d8edd3d0c87aeb5fcff4859a151e478f6f93932e.zip
Make lava brighter by showing light sources at their full emitted light level
Diffstat (limited to 'src/content_mapblock.cpp')
-rw-r--r--src/content_mapblock.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp
index 8f102cd91..3184925a4 100644
--- a/src/content_mapblock.cpp
+++ b/src/content_mapblock.cpp
@@ -210,8 +210,16 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
top_is_same_liquid = true;
u16 l = 0;
+ // If this liquid emits light and doesn't contain light, draw
+ // it at what it emits, for an increased effect
+ u8 light_source = nodedef->get(n).light_source;
+ if(light_source != 0){
+ //l = decode_light(undiminish_light(light_source));
+ l = decode_light(light_source);
+ l = l | (l<<8);
+ }
// Use the light of the node on top if possible
- if(nodedef->get(ntop).param_type == CPT_LIGHT)
+ else if(nodedef->get(ntop).param_type == CPT_LIGHT)
l = getInteriorLight(ntop, 0, data);
// Otherwise use the light of this node (the liquid)
else