aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorGregor Parzefall <82708541+grorp@users.noreply.github.com>2022-07-31 15:18:29 +0200
committerGitHub <noreply@github.com>2022-07-31 15:18:29 +0200
commit70b71c501332521b05173bc8e1d505720d0187c5 (patch)
treef9f1c6524bef5ee8a022b0b40ad16f85c908ec04 /builtin
parent95d7fcb9499d7f51a660847a5b5671925206883f (diff)
downloadminetest-70b71c501332521b05173bc8e1d505720d0187c5.tar.gz
minetest-70b71c501332521b05173bc8e1d505720d0187c5.tar.bz2
minetest-70b71c501332521b05173bc8e1d505720d0187c5.zip
Fix rotation of falling facedir nodes (#12587)
in some cases
Diffstat (limited to 'builtin')
-rw-r--r--builtin/game/falling.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/builtin/game/falling.lua b/builtin/game/falling.lua
index 023bd1fa3..d5727f2a7 100644
--- a/builtin/game/falling.lua
+++ b/builtin/game/falling.lua
@@ -158,12 +158,10 @@ core.register_entity(":__builtin:falling_node", {
or def.drawtype == "normal"
or def.drawtype == "nodebox" then
if (def.paramtype2 == "facedir" or def.paramtype2 == "colorfacedir") then
- local fdir = node.param2 % 32
+ local fdir = node.param2 % 32 % 24
-- Get rotation from a precalculated lookup table
local euler = facedir_to_euler[fdir + 1]
- if euler then
- self.object:set_rotation(euler)
- end
+ self.object:set_rotation(euler)
elseif (def.drawtype ~= "plantlike" and def.drawtype ~= "plantlike_rooted" and
(def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted" or def.drawtype == "signlike")) then
local rot = node.param2 % 8