mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-02-26 09:33:49 +01:00
Remove old workaround in mcl_stairs
This commit is contained in:
@ -4,19 +4,8 @@ local S = minetest.get_translator("mcl_stairs")
|
|||||||
|
|
||||||
-- Wrapper around mintest.pointed_thing_to_face_pos.
|
-- Wrapper around mintest.pointed_thing_to_face_pos.
|
||||||
local function get_fpos(placer, pointed_thing)
|
local function get_fpos(placer, pointed_thing)
|
||||||
local fpos
|
local finepos = minetest.pointed_thing_to_face_pos(placer, pointed_thing)
|
||||||
-- Workaround: minetest.pointed_thing_to_face_pos crashes in MT 0.4.16 if
|
return finepos.y % 1
|
||||||
-- pointed_thing.under and pointed_thing.above are equal
|
|
||||||
-- FIXME: Remove this when MT got fixed.
|
|
||||||
if not vector.equals(pointed_thing.under, pointed_thing.above) then
|
|
||||||
-- The happy case: Everything is normal
|
|
||||||
local finepos = minetest.pointed_thing_to_face_pos(placer, pointed_thing)
|
|
||||||
fpos = finepos.y % 1
|
|
||||||
else
|
|
||||||
-- Fallback if both above and under are equal
|
|
||||||
fpos = 0
|
|
||||||
end
|
|
||||||
return fpos
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function place_slab_normal(itemstack, placer, pointed_thing)
|
local function place_slab_normal(itemstack, placer, pointed_thing)
|
||||||
|
Reference in New Issue
Block a user