0

fixed Hide() primitive and made EdgeLines() play nice

This commit is contained in:
Aaron Griffith
2012-04-12 15:33:24 -04:00
parent f5797dd8a0
commit 838bd2e5ab
3 changed files with 14 additions and 7 deletions

View File

@@ -84,15 +84,21 @@ static int
hide_hidden(void *data, RenderState *state, int x, int y, int z) {
RenderPrimitiveHide *self = (RenderPrimitiveHide *)data;
unsigned int i;
unsigned short block;
if (self->rules == NULL)
return 0;
block = get_data(state, BLOCKS, x, y, z);
for (i = 0; self->rules[i].blockid != 0; i++) {
if (state->block == self->rules[i].blockid) {
if (block == self->rules[i].blockid) {
unsigned char data;
if (!(self->rules[i].has_data))
return 1;
if (state->block_data == self->rules[i].data)
data = get_data(state, DATA, x, y, z);
if (data == self->rules[i].data)
return 1;
}
}