summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2021-04-20 17:50:03 +0000
committerGitHub <noreply@github.com>2021-04-20 19:50:03 +0200
commit90a7bd6a0afb6509e96bcb373f95b448ee7f3b1d (patch)
treeb3243491bdddb11c2ac01a488ad700840f1b5e85 /builtin
parent16e5b39e1dbe503684effb11f4b87a641c3e43e6 (diff)
downloadminetest-90a7bd6a0afb6509e96bcb373f95b448ee7f3b1d.tar.gz
minetest-90a7bd6a0afb6509e96bcb373f95b448ee7f3b1d.tar.bz2
minetest-90a7bd6a0afb6509e96bcb373f95b448ee7f3b1d.zip
Put torch/signlike node on floor if no paramtype2 (#11074)
Diffstat (limited to 'builtin')
-rw-r--r--builtin/game/falling.lua15
1 files changed, 6 insertions, 9 deletions
diff --git a/builtin/game/falling.lua b/builtin/game/falling.lua
index 5450542ff..1f0a63993 100644
--- a/builtin/game/falling.lua
+++ b/builtin/game/falling.lua
@@ -84,9 +84,6 @@ core.register_entity(":__builtin:falling_node", {
local textures
if def.tiles and def.tiles[1] then
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
tile = tile.name
end
@@ -147,11 +144,7 @@ core.register_entity(":__builtin:falling_node", {
-- Rotate entity
if def.drawtype == "torchlike" then
- if def.paramtype2 == "wallmounted" then
- self.object:set_yaw(math.pi*0.25)
- else
- self.object:set_yaw(-math.pi*0.25)
- end
+ self.object:set_yaw(math.pi*0.25)
elseif ((node.param2 ~= 0 or def.drawtype == "nodebox" or def.drawtype == "mesh")
and (def.wield_image == "" or def.wield_image == nil))
or def.drawtype == "signlike"
@@ -165,8 +158,12 @@ core.register_entity(":__builtin:falling_node", {
if euler then
self.object:set_rotation(euler)
end
- elseif (def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted") then
+ elseif (def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted" or def.drawtype == "signlike") then
local rot = node.param2 % 8
+ if (def.drawtype == "signlike" and def.paramtype2 ~= "wallmounted" and def.paramtype2 ~= "colorwallmounted") then
+ -- Change rotation to "floor" by default for non-wallmounted paramtype2
+ rot = 1
+ end
local pitch, yaw, roll = 0, 0, 0
if def.drawtype == "nodebox" or def.drawtype == "mesh" then
if rot == 0 then