Add falling snow when the node underneath is dug.

This commit is contained in:
Splizard 2012-09-04 10:39:54 +12:00
parent 73b962b70c
commit e40fad203e
1 changed files with 2 additions and 0 deletions

View File

@ -242,6 +242,8 @@ local unsnowify = function(pos, node, digger)
local nodename = minetest.env:get_node(pos).name
if nodename == "snow:snow" then
minetest.env:remove_node(pos)
local obj=minetest.env:add_entity({x=pos.x,y=pos.y,z=pos.z}, "snow:snowball_entity")
obj:setacceleration({x=0, y=-snowball_GRAVITY, z=0})
end
end