Collapse special case logic to block_class_is_subset
Thanks demorgan's law
This commit is contained in:
@@ -219,7 +219,9 @@ smooth_lighting_draw(void *data, RenderState *state, PyObject *src, PyObject *ma
|
|||||||
|
|
||||||
/* special case for leaves, water 8, water 9, ice 79
|
/* special case for leaves, water 8, water 9, ice 79
|
||||||
-- these are also smooth-lit! */
|
-- these are also smooth-lit! */
|
||||||
if (state->block != block_leaves && state->block != block_flowing_water && state->block != block_water && state->block != block_ice && is_transparent(state->block))
|
if (!block_class_is_subset(state->block,(mc_block_t[]){
|
||||||
|
block_leaves,block_flowing_water,block_water,block_ice
|
||||||
|
},4) && is_transparent(state->block))
|
||||||
{
|
{
|
||||||
/* transparent blocks are rendered as usual, with flat lighting */
|
/* transparent blocks are rendered as usual, with flat lighting */
|
||||||
primitive_lighting.draw(data, state, src, mask, mask_light);
|
primitive_lighting.draw(data, state, src, mask, mask_light);
|
||||||
|
|||||||
Reference in New Issue
Block a user