From c17e33a81043e814b80b531fb74fbb326e6fcc4f Mon Sep 17 00:00:00 2001 From: Aaron Griffith Date: Thu, 7 Jun 2012 20:17:49 -0400 Subject: [PATCH] skip_sides in lighting_is_face_occluded is now correctly named switched a conditional, but should still be fixed as per 75f80dae954c565cb62089b10cc7c075f4bf1ea1 --- overviewer_core/src/primitives/lighting.c | 6 +++--- overviewer_core/src/primitives/smooth-lighting.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/overviewer_core/src/primitives/lighting.c b/overviewer_core/src/primitives/lighting.c index 79895a4..317ac98 100644 --- a/overviewer_core/src/primitives/lighting.c +++ b/overviewer_core/src/primitives/lighting.c @@ -202,7 +202,7 @@ lighting_is_face_occluded(RenderState *state, int skip_sides, int x, int y, int /* this face isn't visible, so don't draw anything */ return 1; } - } else if (skip_sides) { + } else if (!skip_sides) { unsigned short block = get_data(state, BLOCKS, x, y, z); if (!is_transparent(block)) { /* the same thing but for adjacent chunks, this solves an @@ -242,8 +242,8 @@ lighting_start(void *data, RenderState *state, PyObject *support) { RenderPrimitiveLighting* self; self = (RenderPrimitiveLighting *)data; - /* skip sides by default */ - self->skip_sides = 1; + /* don't skip sides by default */ + self->skip_sides = 0; if (!render_mode_parse_option(support, "strength", "f", &(self->strength))) return 1; diff --git a/overviewer_core/src/primitives/smooth-lighting.c b/overviewer_core/src/primitives/smooth-lighting.c index 8840253..6e3da54 100644 --- a/overviewer_core/src/primitives/smooth-lighting.c +++ b/overviewer_core/src/primitives/smooth-lighting.c @@ -143,7 +143,7 @@ do_shading_with_rule(RenderPrimitiveSmoothLighting *self, RenderState *state, st int cz = state->z + face.dz; /* first, check for occlusion if the block is in the local chunk */ - if (lighting_is_face_occluded(state, 1, cx, cy, cz)) + if (lighting_is_face_occluded(state, 0, cx, cy, cz)) return; /* calculate the lighting colors for each point */