diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-01-28 07:19:30 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-01-28 07:19:30 -0500 |
commit | 0fbf6baa72ad6db80ff79f29190474718d4d8acd (patch) | |
tree | 2b9474e6163409dd6d136190cd780793f943d774 /init.lua | |
parent | 525a143398777ea50bd8d76ee654a5c7bb719fd9 (diff) | |
download | unifieddyes-0fbf6baa72ad6db80ff79f29190474718d4d8acd.tar unifieddyes-0fbf6baa72ad6db80ff79f29190474718d4d8acd.tar.gz unifieddyes-0fbf6baa72ad6db80ff79f29190474718d4d8acd.tar.bz2 unifieddyes-0fbf6baa72ad6db80ff79f29190474718d4d8acd.tar.xz unifieddyes-0fbf6baa72ad6db80ff79f29190474718d4d8acd.zip |
fix facedir not being set when simple node placement fall-through is called
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -304,7 +304,12 @@ function unifieddyes.on_rightclick(pos, node, player, stack, pointed_thing, newn if unifieddyes.is_buildable_to(player:get_player_name(), pos2) and minetest.registered_nodes[name] then local placeable_node = minetest.registered_nodes[stack:get_name()] - minetest.set_node(pos2, placeable_node) + + local yaw = player:get_look_yaw() + local dir = minetest.yaw_to_dir(yaw-1.5) + local fdir = minetest.dir_to_facedir(dir) + + minetest.set_node(pos2, { name = placeable_node.name, param2 = fdir }) stack:take_item() return stack end |