summaryrefslogtreecommitdiff
path: root/src/content_mapblock.cpp
diff options
context:
space:
mode:
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