C: Amend logic in block_class_is_wall()
Resolves an issue where this function would mistakenly identify various non-wall blocks as walls
This commit is contained in:
@@ -62,7 +62,7 @@ bool block_class_is_wall(mc_block_t block) {
|
|||||||
mc_block_t mask = 0b11111111;
|
mc_block_t mask = 0b11111111;
|
||||||
mc_block_t prefix = 0b111 << 8; // 1792 is the starting offset
|
mc_block_t prefix = 0b111 << 8; // 1792 is the starting offset
|
||||||
// if the xor zeroes all bits, the prefix must've matched.
|
// if the xor zeroes all bits, the prefix must've matched.
|
||||||
return (block & ~mask) ^ prefix == 0;
|
return ((block & ~mask) ^ prefix) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const mc_block_t block_class_stair[] = {
|
const mc_block_t block_class_stair[] = {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
// increment this value if you've made a change to the c extension
|
// increment this value if you've made a change to the c extension
|
||||||
// and want to force users to rebuild
|
// and want to force users to rebuild
|
||||||
#define OVERVIEWER_EXTENSION_VERSION 90
|
#define OVERVIEWER_EXTENSION_VERSION 91
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user