aboutsummaryrefslogtreecommitdiff
path: root/builtin/common/misc_helpers.lua
diff options
context:
space:
mode:
authordvere <dvere@users.noreply.github.com>2014-11-25 12:44:38 +1000
committerCraig Robbins <kde.psych@gmail.com>2014-11-25 12:44:47 +1000
commit9878e8de4fdf232ebb77b396766c339786c01218 (patch)
tree11df41f167ed3157c86db8b91fd808aba430cfd9 /builtin/common/misc_helpers.lua
parenta1db83e93f21c99b8799a7338df16ca65453a424 (diff)
downloadminetest-9878e8de4fdf232ebb77b396766c339786c01218.tar.gz
minetest-9878e8de4fdf232ebb77b396766c339786c01218.tar.bz2
minetest-9878e8de4fdf232ebb77b396766c339786c01218.zip
Adjust the values of dirs1 and dirs2 so that rotate_and_place orients textures correctly
According to doc/lua_api.txt if paramtype2 == "facedir" the two least significant bits of parm2 orient the texture around the axis. For dirs1 (looking at a wall) these would be 0, 1, 2, 3 and for dirs2 (looking at the ceiling) 2, 1, 0, 3
Diffstat (limited to 'builtin/common/misc_helpers.lua')
-rw-r--r--builtin/common/misc_helpers.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/common/misc_helpers.lua b/builtin/common/misc_helpers.lua
index a12de5970..48488ab62 100644
--- a/builtin/common/misc_helpers.lua
+++ b/builtin/common/misc_helpers.lua
@@ -340,8 +340,8 @@ end
--------------------------------------------------------------------------------
if INIT == "game" then
- local dirs1 = {9, 18, 7, 12}
- local dirs2 = {20, 23, 22, 21}
+ local dirs1 = {8, 17, 6, 15}
+ local dirs2 = {22, 21, 20, 23}
function core.rotate_and_place(itemstack, placer, pointed_thing,
infinitestacks, orient_flags)