Compare commits

...

5 Commits

Author SHA1 Message Date
bri cassa 0c40684377 Merge branch 'dev' 2022-09-25 15:02:45 +02:00
bri cassa a18b189e01 Merge remote-tracking branch 'upstream/stable-5' into dev 2022-09-25 14:14:30 +02:00
sfan5 08057e8e0f Merge remote-tracking branch 'origin/stable-5' into HEAD 2022-09-19 21:45:31 +02:00
VitaliyShar aff9c28eed
Improve stair placement rotation for bridging (#2979)
Co-authored-by: sfan5 <sfan5@live.de>
2022-08-18 11:02:24 +02:00
ROllerozxa e903b1f6d0 Make default an optional dependency for the creative mod 2022-08-18 10:16:22 +02:00
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,4 @@
name = creative
description = Minetest Game mod: creative
depends = default, sfinv
depends = sfinv
optional_depends = default

View File

@ -32,7 +32,13 @@ local function rotate_and_place(itemstack, placer, pointed_thing)
if placer then
local placer_pos = placer:get_pos()
if placer_pos then
param2 = minetest.dir_to_facedir(vector.subtract(p1, placer_pos))
local diff = vector.subtract(p1, placer_pos)
param2 = minetest.dir_to_facedir(diff)
-- The player places a node on the side face of the node he is standing on
if p0.y == p1.y and math.abs(diff.x) <= 0.5 and math.abs(diff.z) <= 0.5 and diff.y < 0 then
-- reverse node direction
param2 = (param2 + 2) % 4
end
end
local finepos = minetest.pointed_thing_to_face_pos(placer, pointed_thing)