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.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin/game/falling.lua b/builtin/game/falling.lua
index a553400f0..1876cf2a8 100644
--- a/builtin/game/falling.lua
+++ b/builtin/game/falling.lua
@@ -104,12 +104,16 @@ core.register_entity(":__builtin:falling_node", {
end
end
-- Create node and remove entity
- if core.registered_nodes[self.node.name] then
+ local def = core.registered_nodes[self.node.name]
+ if def then
core.add_node(np, self.node)
if self.meta then
local meta = core.get_meta(np)
meta:from_table(self.meta)
end
+ if def.sounds and def.sounds.place and def.sounds.place.name then
+ core.sound_play(def.sounds.place, {pos = np})
+ end
end
self.object:remove()
core.check_for_falling(np)