mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-13 05:20:22 +02:00
Fix stair placement error caused by unexpected param2 values
This commit is contained in:
committed by
Hugo Locurcio
parent
58baa2b5f5
commit
533045d382
@ -66,7 +66,10 @@ stairsplus.rotate_node_aux = function(itemstack, placer, pointed_thing)
|
|||||||
local wallmounted = minetest.dir_to_wallmounted(vector.subtract(pointed_thing.above, under))
|
local wallmounted = minetest.dir_to_wallmounted(vector.subtract(pointed_thing.above, under))
|
||||||
|
|
||||||
if same_cat and not aux then
|
if same_cat and not aux then
|
||||||
p2 = under_node.param2
|
-- param2 can be in the range [0, 31]. We assume that the stair nodes use the
|
||||||
|
-- drawtype "facedir". Wrap the value like done in Luanti `src/mapnode.cpp`.
|
||||||
|
p2 = under_node.param2 % 24
|
||||||
|
|
||||||
-- flip if placing above or below an upright or upside-down node
|
-- flip if placing above or below an upright or upside-down node
|
||||||
-- TODO should we also flip when placing next to a side-mounted node?
|
-- TODO should we also flip when placing next to a side-mounted node?
|
||||||
if wallmounted < 2 then
|
if wallmounted < 2 then
|
||||||
|
Reference in New Issue
Block a user