mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 22:52:25 +01:00
Fix falling mesh nodes being half size (#11389)
This commit is contained in:
parent
e912008cb3
commit
ff9945dc6e
@ -111,14 +111,21 @@ core.register_entity(":__builtin:falling_node", {
|
|||||||
itemstring = core.itemstring_with_palette(itemstring, node.param2)
|
itemstring = core.itemstring_with_palette(itemstring, node.param2)
|
||||||
end
|
end
|
||||||
-- FIXME: solution needed for paramtype2 == "leveled"
|
-- FIXME: solution needed for paramtype2 == "leveled"
|
||||||
local s = (def.visual_scale or 1) * SCALE
|
-- Calculate size of falling node
|
||||||
if def.drawtype == "mesh" then
|
local s = {}
|
||||||
s = s * 0.5
|
s.x = (def.visual_scale or 1) * SCALE
|
||||||
|
s.y = s.x
|
||||||
|
s.z = s.x
|
||||||
|
-- Compensate for wield_scale
|
||||||
|
if def.wield_scale then
|
||||||
|
s.x = s.x / def.wield_scale.x
|
||||||
|
s.y = s.y / def.wield_scale.y
|
||||||
|
s.z = s.z / def.wield_scale.z
|
||||||
end
|
end
|
||||||
self.object:set_properties({
|
self.object:set_properties({
|
||||||
is_visible = true,
|
is_visible = true,
|
||||||
wield_item = itemstring,
|
wield_item = itemstring,
|
||||||
visual_size = vector.new(s, s, s),
|
visual_size = s,
|
||||||
glow = def.light_source,
|
glow = def.light_source,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user