Skip to content
Permalink
Browse files

Fix regression in light calculation

  • Loading branch information
sapier sapier
sapier authored and sapier committed Jun 30, 2014
1 parent 9afeb97 commit bfaba2c12a9eb00a602c12f9724c8701842cc385
Showing with 4 additions and 1 deletion.
  1. +4 −1 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)

0 comments on commit bfaba2c

Please sign in to comment.
You can’t perform that action at this time.