mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Make lava brighter by showing light sources at their full emitted light level
This commit is contained in:
parent
1b078efd5f
commit
d8edd3d0c8
2 changed files with 26 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue