Fix falling image of torchlike if paramtype2="none" (#10612)
This commit is contained in:
parent
73211c68d6
commit
36057e578a
|
@ -84,6 +84,9 @@ core.register_entity(":__builtin:falling_node", {
|
||||||
local textures
|
local textures
|
||||||
if def.tiles and def.tiles[1] then
|
if def.tiles and def.tiles[1] then
|
||||||
local tile = def.tiles[1]
|
local tile = def.tiles[1]
|
||||||
|
if def.drawtype == "torchlike" and def.paramtype2 ~= "wallmounted" then
|
||||||
|
tile = def.tiles[2] or def.tiles[1]
|
||||||
|
end
|
||||||
if type(tile) == "table" then
|
if type(tile) == "table" then
|
||||||
tile = tile.name
|
tile = tile.name
|
||||||
end
|
end
|
||||||
|
@ -144,7 +147,11 @@ core.register_entity(":__builtin:falling_node", {
|
||||||
|
|
||||||
-- Rotate entity
|
-- Rotate entity
|
||||||
if def.drawtype == "torchlike" then
|
if def.drawtype == "torchlike" then
|
||||||
|
if def.paramtype2 == "wallmounted" then
|
||||||
self.object:set_yaw(math.pi*0.25)
|
self.object:set_yaw(math.pi*0.25)
|
||||||
|
else
|
||||||
|
self.object:set_yaw(-math.pi*0.25)
|
||||||
|
end
|
||||||
elseif (node.param2 ~= 0 and (def.wield_image == ""
|
elseif (node.param2 ~= 0 and (def.wield_image == ""
|
||||||
or def.wield_image == nil))
|
or def.wield_image == nil))
|
||||||
or def.drawtype == "signlike"
|
or def.drawtype == "signlike"
|
||||||
|
|
Loading…
Reference in New Issue