projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9afeb97
)
Fix regression in light calculation
author
sapier
<Sapier at GMX dot net>
Mon, 30 Jun 2014 20:56:08 +0000
(22:56 +0200)
committer
sapier
<Sapier at GMX dot net>
Mon, 30 Jun 2014 20:56:08 +0000
(22:56 +0200)
src/mapblock_mesh.cpp
patch
|
blob
|
history
diff --git
a/src/mapblock_mesh.cpp
b/src/mapblock_mesh.cpp
index bcc4cba5c8e3aac5ae24e28759c94f1e3eb57adc..21d431cd1ec984079ac35c0453ede8164d722f2c 100644
(file)
--- a/
src/mapblock_mesh.cpp
+++ b/
src/mapblock_mesh.cpp
@@
-258,8
+258,8
@@
static u8 getSmoothLight(enum LightBank bank, v3s16 p, MeshMakeData *data)
{
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) {
- ambient_occlusion++;
continue;
}
@@
-273,6
+273,9
@@
static u8 getSmoothLight(enum LightBank bank, v3s16 p, MeshMakeData *data)
light += decode_light(n.getLight(bank, ndef));
light_count++;
}
+ else {
+ ambient_occlusion++;
+ }
}
if(light_count == 0)