1
0
鏡像自 https://github.com/minetest/minetest.git 已同步 2025-06-30 23:20:22 +02:00

Make facedir_to_dir and wallmounted_to_dir work with coloured nodes as well. (#5153)

此提交包含在:
Nathanaël Courant
2017-02-01 00:02:30 +01:00
提交者 Auke Kok
父節點 74afe6fe6b
當前提交 3e355ab7d5

查看文件

@ -109,7 +109,7 @@ local facedir_to_dir_map = {
1, 4, 3, 2,
}
function core.facedir_to_dir(facedir)
return facedir_to_dir[facedir_to_dir_map[facedir]]
return facedir_to_dir[facedir_to_dir_map[facedir % 32]]
end
function core.dir_to_wallmounted(dir)
@ -144,7 +144,7 @@ local wallmounted_to_dir = {
{x = 0, y = 0, z = -1},
}
function core.wallmounted_to_dir(wallmounted)
return wallmounted_to_dir[wallmounted]
return wallmounted_to_dir[wallmounted % 8]
end
function core.dir_to_yaw(dir)