skip_sides in lighting_is_face_occluded is now correctly named
switched a conditional, but should still be fixed as per 75f80dae95
This commit is contained in:
@@ -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 */
|
/* this face isn't visible, so don't draw anything */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} else if (skip_sides) {
|
} else if (!skip_sides) {
|
||||||
unsigned short block = get_data(state, BLOCKS, x, y, z);
|
unsigned short block = get_data(state, BLOCKS, x, y, z);
|
||||||
if (!is_transparent(block)) {
|
if (!is_transparent(block)) {
|
||||||
/* the same thing but for adjacent chunks, this solves an
|
/* the same thing but for adjacent chunks, this solves an
|
||||||
@@ -242,8 +242,8 @@ lighting_start(void *data, RenderState *state, PyObject *support) {
|
|||||||
RenderPrimitiveLighting* self;
|
RenderPrimitiveLighting* self;
|
||||||
self = (RenderPrimitiveLighting *)data;
|
self = (RenderPrimitiveLighting *)data;
|
||||||
|
|
||||||
/* skip sides by default */
|
/* don't skip sides by default */
|
||||||
self->skip_sides = 1;
|
self->skip_sides = 0;
|
||||||
|
|
||||||
if (!render_mode_parse_option(support, "strength", "f", &(self->strength)))
|
if (!render_mode_parse_option(support, "strength", "f", &(self->strength)))
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ do_shading_with_rule(RenderPrimitiveSmoothLighting *self, RenderState *state, st
|
|||||||
int cz = state->z + face.dz;
|
int cz = state->z + face.dz;
|
||||||
|
|
||||||
/* first, check for occlusion if the block is in the local chunk */
|
/* 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;
|
return;
|
||||||
|
|
||||||
/* calculate the lighting colors for each point */
|
/* calculate the lighting colors for each point */
|
||||||
|
|||||||
Reference in New Issue
Block a user