aboutsummaryrefslogtreecommitdiff
path: root/builtin/game/falling.lua
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/game/falling.lua')
-rw-r--r--builtin/game/falling.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/builtin/game/falling.lua b/builtin/game/falling.lua
index d5727f2a7..01a7d60b8 100644
--- a/builtin/game/falling.lua
+++ b/builtin/game/falling.lua
@@ -161,7 +161,16 @@ core.register_entity(":__builtin:falling_node", {
local fdir = node.param2 % 32 % 24
-- Get rotation from a precalculated lookup table
local euler = facedir_to_euler[fdir + 1]
- self.object:set_rotation(euler)
+ if euler then
+ self.object:set_rotation(euler)
+ end
+ elseif (def.paramtype2 == "4dir" or def.paramtype2 == "color4dir") then
+ local fdir = node.param2 % 4
+ -- Get rotation from a precalculated lookup table
+ local euler = facedir_to_euler[fdir + 1]
+ if euler then
+ self.object:set_rotation(euler)
+ end
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