From 19a2eafcd54a12b493fc6291f0eeb48989a75b39 Mon Sep 17 00:00:00 2001 From: Aaron Griffith Date: Wed, 23 Mar 2011 00:19:54 -0400 Subject: [PATCH] fixed black lines showing up on lit maps, at chunk boundaries --- src/rendermode-lighting.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rendermode-lighting.c b/src/rendermode-lighting.c index b00c3aa..314ea53 100644 --- a/src/rendermode-lighting.c +++ b/src/rendermode-lighting.c @@ -69,6 +69,12 @@ get_lighting_coefficient(RenderModeLighting *self, RenderState *state, int x, in unsigned char block = getArrayByte3D(blocks, local_x, local_y, local_z); + /* if this block is opaque, use a fully-lit coeff instead + to prevent stippled lines along chunk boundaries! */ + if (!is_transparent(block)) { + return self->calculate_darkness(15, 0); + } + if (block == 44) { /* TODO special handling for half-blocks! */ }