edge-lines and nether primitives in working order
This commit is contained in:
@@ -19,15 +19,31 @@
|
||||
|
||||
static int
|
||||
nether_hidden(void *data, RenderState *state, int x, int y, int z) {
|
||||
/* hide all blocks above all air blocks */
|
||||
while (z < 128)
|
||||
/* hide all blocks above all air blocks
|
||||
|
||||
due to how the nether is currently generated, this will also count
|
||||
empty sections as 'solid'
|
||||
*/
|
||||
unsigned char missing_section = 0;
|
||||
while (y < (SECTIONS_PER_CHUNK - state->chunky) * 16)
|
||||
{
|
||||
if (getArrayByte3D(state->blocks, x, y, z) == 0)
|
||||
{
|
||||
return 0;
|
||||
break;
|
||||
if (state->chunks[1][1].sections[state->chunky + (y / 16)].blocks == NULL) {
|
||||
missing_section = 1;
|
||||
y += 16;
|
||||
continue;
|
||||
} else {
|
||||
/* if we passed through a missing section, but now are back in,
|
||||
that counts as air */
|
||||
if (missing_section)
|
||||
return 0;
|
||||
missing_section = 0;
|
||||
}
|
||||
z++;
|
||||
|
||||
if (!missing_section && get_data(state, BLOCKS, x, y, z) == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
y++;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user