mirror of
https://github.com/minetest/minetest.git
synced 2024-09-12 00:26:50 +02:00
Reformat rot array in NodeDefManager::nodeboxConnects, to make it less magic
This commit is contained in:
parent
64104585c5
commit
1d31533601
@ -1736,18 +1736,41 @@ bool NodeDefManager::nodeboxConnects(MapNode from, MapNode to,
|
||||
f2.param_type_2 == CPT2_4DIR ||
|
||||
f2.param_type_2 == CPT2_COLORED_4DIR)
|
||||
&& (connect_face >= 4)) {
|
||||
static const u8 rot[33 * 4] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 4, 32, 16, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, // 4 - back
|
||||
8, 4, 32, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, // 8 - right
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 8, 4, 32, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, // 16 - front
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 32, 16, 8, 4 // 32 - left
|
||||
};
|
||||
static const u8 rot[33 * 4] = {
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
4, 32, 16, 8, // 4 - back
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
8, 4, 32, 16, // 8 - right
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
16, 8, 4, 32, // 16 - front
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
32, 16, 8, 4 // 32 - left
|
||||
};
|
||||
if (f2.param_type_2 == CPT2_FACEDIR ||
|
||||
f2.param_type_2 == CPT2_COLORED_FACEDIR) {
|
||||
return (f2.connect_sides
|
||||
|
Loading…
Reference in New Issue
Block a user