forked from VoxeLibre/VoxeLibre
Fix rotation of falling anvils
This commit is contained in:
parent
b7b6f356fa
commit
dfafa6c969
|
@ -19,6 +19,15 @@ minetest.register_entity(":__builtin:falling_node", {
|
||||||
is_visible = true,
|
is_visible = true,
|
||||||
textures = {node.name},
|
textures = {node.name},
|
||||||
})
|
})
|
||||||
|
local def = core.registered_nodes[node.name]
|
||||||
|
-- Set correct entity yaw
|
||||||
|
if node.param2 ~= 0 then
|
||||||
|
if (def.paramtype2 == "facedir" or def.paramtype2 == "colorfacedir") then
|
||||||
|
self.object:set_yaw(core.dir_to_yaw(core.facedir_to_dir(node.param2)))
|
||||||
|
elseif (def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted") then
|
||||||
|
self.object:set_yaw(core.dir_to_yaw(core.wallmounted_to_dir(node.param2)))
|
||||||
|
end
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
get_staticdata = function(self)
|
get_staticdata = function(self)
|
||||||
|
|
Loading…
Reference in New Issue