mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Fix regression in light calculation
This commit is contained in:
parent
9afeb97fc6
commit
bfaba2c12a
1 changed files with 4 additions and 1 deletions
|
@ -258,8 +258,8 @@ static u8 getSmoothLight(enum LightBank bank, v3s16 p, MeshMakeData *data)
|
||||||
{
|
{
|
||||||
MapNode n = data->m_vmanip.getNodeNoEx(p - dirs8[i]);
|
MapNode n = data->m_vmanip.getNodeNoEx(p - dirs8[i]);
|
||||||
|
|
||||||
|
// if it's CONTENT_IGNORE we can't do any light calculations
|
||||||
if (n.getContent() == CONTENT_IGNORE) {
|
if (n.getContent() == CONTENT_IGNORE) {
|
||||||
ambient_occlusion++;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,6 +273,9 @@ static u8 getSmoothLight(enum LightBank bank, v3s16 p, MeshMakeData *data)
|
||||||
light += decode_light(n.getLight(bank, ndef));
|
light += decode_light(n.getLight(bank, ndef));
|
||||||
light_count++;
|
light_count++;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
ambient_occlusion++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(light_count == 0)
|
if(light_count == 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue