0

Make seas more like in-game (draw only the top surface).

This commit is contained in:
Alejandro Aguilera
2011-05-28 01:08:55 +02:00
parent a58f23d128
commit e0a3f0c4ce

View File

@@ -160,8 +160,12 @@ generate_pseudo_data(RenderState *state, unsigned char ancilData) {
return ancilData;
} else if (state->block == 9) { /* water */
/* an aditional bit for top is added to the 4 bits of check_adjacent_blocks */
if (ancilData == 0) { /* static water, only top, and unkown ancildata values */
if (ancilData == 0) { /* static water */
if ((z != 127) && (getArrayByte3D(state->blocks, x, y, z+1) == 9)) {
data = 0;
} else {
data = 16;
}
return data; /* = 0b10000 */
} else if ((ancilData > 0) && (ancilData < 8)) { /* flowing water */
data = (check_adjacent_blocks(state, x, y, z, state->block) ^ 0x0f) | 0x10;