0

Fixed cave render for solid unknown blocks.

is_transparent returns 1 for every unknown block because that's an easy way to
make them ignore lighting, however, this makes cave render useless with a map
containing unknown ores.

The definition is_known_transparent checks whether a block is transparent and is known.

This is a workaround, a proper fix would be to have unknown blocks be neither transparent nor
solid. Or make them both. But don't prefer one of the two.
This commit is contained in:
Nicolas Frattaroli
2013-09-13 23:54:58 +02:00
parent ac4f8103ab
commit 89fc9b01b6
2 changed files with 4 additions and 3 deletions

View File

@@ -147,6 +147,7 @@ block_has_property(unsigned short b, BlockProperty prop) {
return block_properties[b] & (1 << prop);
}
#define is_transparent(b) block_has_property((b), TRANSPARENT)
#define is_known_transparent(b) block_has_property((b), TRANSPARENT) && block_has_property((b), KNOWN)
/* helper for indexing section data possibly across section boundaries */
typedef enum