snow cannon works again with newer versions of mt

This commit is contained in:
Sokomine 2016-12-03 00:25:08 +01:00
parent 39b14ac8b6
commit 2372e6fe19

View File

@ -1,4 +1,10 @@
-- this function used to be in builtin/game/falling_node.lua, but there it got made local; we need it here
moresnow.spawn_falling_node = function(p, node)
local obj = core.add_entity(p, "__builtin:falling_node")
obj:get_luaentity():set_node(node)
end
moresnow.throw_snowball = function( pos, dir, player )
local snowball_GRAVITY=9
local snowball_VELOCITY=19
@ -29,7 +35,7 @@ moresnow.snow_at_one_place = function( pos )
local n = minetest.get_node( pos );
if( not(n) or not( n.name ) or n.name=='air' ) then
spawn_falling_node( pos, {name="default:snow"})
moresnow.spawn_falling_node( pos, {name="default:snow"})
end
end