1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-12-23 00:20:17 +01:00

fix crash in door placement (copy&paste error)

This commit is contained in:
Vanessa Ezekowitz 2017-01-31 11:52:11 -05:00
parent f6aa12aef9
commit 7623b39a33

View File

@ -154,7 +154,7 @@ function homedecor.stack_wing(itemstack, placer, pointed_thing, node1, node2, no
local forceright = placer:get_player_control()["sneak"] local forceright = placer:get_player_control()["sneak"]
local fdir = minetest.dir_to_facedir(placer:get_look_dir()) local fdir = minetest.dir_to_facedir(placer:get_look_dir())
local is_right_wing = node1 == minetest.get_node({ x = pos.x + homedecor.wall_fdir_to_left[fdir+1][1], y=pos.y, z = pos.z + homedecor.fdir_to_left[fdir+1][2] }).name local is_right_wing = node1 == minetest.get_node({ x = pos.x + homedecor.fdir_to_left[fdir+1][1], y=pos.y, z = pos.z + homedecor.fdir_to_left[fdir+1][2] }).name
if forceright or is_right_wing then if forceright or is_right_wing then
node1, node2 = node1_right, node2_right node1, node2 = node1_right, node2_right
end end
@ -171,7 +171,7 @@ function homedecor.stack_sideways(itemstack, placer, pointed_thing, node1, node2
if not pos then return itemstack end if not pos then return itemstack end
local fdir = minetest.dir_to_facedir(placer:get_look_dir()) local fdir = minetest.dir_to_facedir(placer:get_look_dir())
local fdir_transform = dir and homedecor.wall_fdir_to_right or homedecor.wall_dir_to_fwd local fdir_transform = dir and homedecor.fdir_to_right or homedecor.dir_to_fwd
local pos2 = { x = pos.x + fdir_transform[fdir+1][1], y=pos.y, z = pos.z + fdir_transform[fdir+1][2] } local pos2 = { x = pos.x + fdir_transform[fdir+1][1], y=pos.y, z = pos.z + fdir_transform[fdir+1][2] }