0

blocks with invalid or unsupported data will now still draw *something*

it looks weird to just draw nothing, especially if the block is
opaque, since you can then see through the world.

fixes issue reported in Issue #563
This commit is contained in:
Aaron Griffith
2011-12-24 15:42:28 -05:00
parent 737f7b75a7
commit e6ccd79b1b

View File

@@ -481,6 +481,9 @@ chunk_render(PyObject *self, PyObject *args) {
/* get the texture */ /* get the texture */
t = PyList_GET_ITEM(blockmap, max_data * state.block + ancilData); t = PyList_GET_ITEM(blockmap, max_data * state.block + ancilData);
/* if we don't get a texture, try it again with 0 data */
if ((t == NULL || t == Py_None) && ancilData != 0)
t = PyList_GET_ITEM(blockmap, max_data * state.block);
/* if we found a proper texture, render it! */ /* if we found a proper texture, render it! */
if (t != NULL && t != Py_None) if (t != NULL && t != Py_None)