Skip to content

Commit

Permalink
Fix regression in light calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
sapier authored and sapier committed Jun 30, 2014
1 parent 9afeb97 commit bfaba2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mapblock_mesh.cpp
Expand Up @@ -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;
}

Expand All @@ -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)
Expand Down

0 comments on commit bfaba2c

Please sign in to comment.