Implement style fixes
This commit is contained in:
@@ -140,7 +140,7 @@ estimate_blocklevel(RenderPrimitiveLighting *self, RenderState *state,
|
||||
blocklevel = get_data(state, BLOCKLIGHT, x, y, z);
|
||||
|
||||
/* no longer a guess */
|
||||
if (!block_class_is_subset(block,block_class_alt_height,block_class_alt_height_len) && authoratative) {
|
||||
if (!block_class_is_subset(block, block_class_alt_height, block_class_alt_height_len) && authoratative) {
|
||||
*authoratative = 1;
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ get_lighting_color(RenderPrimitiveLighting *self, RenderState *state,
|
||||
|
||||
/* special half-step handling, stairs handling */
|
||||
/* Anvil also needs to be here, blockid 145 */
|
||||
if ( block_class_is_subset(block,block_class_alt_height,block_class_alt_height_len) || block == block_anvil) {
|
||||
if ( block_class_is_subset(block, block_class_alt_height, block_class_alt_height_len) || block == block_anvil) {
|
||||
unsigned int upper_block;
|
||||
|
||||
/* stairs and half-blocks take the skylevel from the upper block if it's transparent */
|
||||
@@ -170,7 +170,7 @@ get_lighting_color(RenderPrimitiveLighting *self, RenderState *state,
|
||||
do {
|
||||
upper_counter++;
|
||||
upper_block = get_data(state, BLOCKS, x, y + upper_counter, z);
|
||||
} while (block_class_is_subset(upper_block,block_class_alt_height,block_class_alt_height_len));
|
||||
} while (block_class_is_subset(upper_block, block_class_alt_height, block_class_alt_height_len));
|
||||
if (is_transparent(upper_block)) {
|
||||
skylevel = get_data(state, SKYLIGHT, x, y + upper_counter, z);
|
||||
} else {
|
||||
@@ -183,7 +183,7 @@ get_lighting_color(RenderPrimitiveLighting *self, RenderState *state,
|
||||
|
||||
}
|
||||
|
||||
if (block_class_is_subset(block,(mc_block_t[]){block_flowing_lava,block_lava},2)) {
|
||||
if (block_class_is_subset(block, (mc_block_t[]){block_flowing_lava,block_lava}, 2)) {
|
||||
/* lava blocks should always be lit! */
|
||||
*r = 255;
|
||||
*g = 255;
|
||||
@@ -302,7 +302,7 @@ lighting_draw(void *data, RenderState *state, PyObject *src, PyObject *mask, PyO
|
||||
self = (RenderPrimitiveLighting *)data;
|
||||
x = state->x, y = state->y, z = state->z;
|
||||
|
||||
if (block_class_is_subset(state->block,(mc_block_t[]){block_flowing_water,block_water},2)) { /* special case for water */
|
||||
if (block_class_is_subset(state->block, (mc_block_t[]){block_flowing_water,block_water}, 2)) { /* special case for water */
|
||||
/* looks like we need a new case for lighting, there are
|
||||
* blocks that are transparent for occlusion calculations and
|
||||
* need per-face shading if the face is drawn. */
|
||||
|
||||
Reference in New Issue
Block a user