Minor fix in check order

This commit is contained in:
sapier 2014-06-08 14:16:48 +02:00
parent fcfd53aed1
commit d5de0cbf71

@ -257,6 +257,12 @@ static u8 getSmoothLight(enum LightBank bank, v3s16 p, MeshMakeData *data)
for(u32 i=0; i<8; i++) for(u32 i=0; i<8; i++)
{ {
MapNode n = data->m_vmanip.getNodeNoEx(p - dirs8[i]); MapNode n = data->m_vmanip.getNodeNoEx(p - dirs8[i]);
if (n.getContent() == CONTENT_IGNORE) {
ambient_occlusion++;
continue;
}
const ContentFeatures &f = ndef->get(n); const ContentFeatures &f = ndef->get(n);
if(f.light_source > light_source_max) if(f.light_source > light_source_max)
light_source_max = f.light_source; light_source_max = f.light_source;
@ -267,10 +273,6 @@ 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 if(n.getContent() != CONTENT_IGNORE)
{
ambient_occlusion++;
}
} }
if(light_count == 0) if(light_count == 0)