Skip to content

Commit bfaba2c

Browse files
sapiersapier
sapier
authored and
sapier
committedJun 30, 2014
Fix regression in light calculation
1 parent 9afeb97 commit bfaba2c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/mapblock_mesh.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ static u8 getSmoothLight(enum LightBank bank, v3s16 p, MeshMakeData *data)
258258
{
259259
MapNode n = data->m_vmanip.getNodeNoEx(p - dirs8[i]);
260260

261+
// if it's CONTENT_IGNORE we can't do any light calculations
261262
if (n.getContent() == CONTENT_IGNORE) {
262-
ambient_occlusion++;
263263
continue;
264264
}
265265

@@ -273,6 +273,9 @@ static u8 getSmoothLight(enum LightBank bank, v3s16 p, MeshMakeData *data)
273273
light += decode_light(n.getLight(bank, ndef));
274274
light_count++;
275275
}
276+
else {
277+
ambient_occlusion++;
278+
}
276279
}
277280

278281
if(light_count == 0)

0 commit comments

Comments
 (0)
Please sign in to comment.