forked from mtcontrib/minetest-mod-snow
Remove snowfall entities if they get stuck for more then 2mins.
This commit is contained in:
parent
040e8d2354
commit
2cc269f544
4
init.lua
4
init.lua
@ -434,6 +434,10 @@ if snow.enable_snowfall then
|
|||||||
minetest.env:place_node(self.lastpos,{name="snow:snow"})
|
minetest.env:place_node(self.lastpos,{name="snow:snow"})
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.timer > 120 then
|
||||||
|
self.object:remove()
|
||||||
|
end
|
||||||
|
|
||||||
self.lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set lastpos-->Node will be added at last pos outside the node
|
self.lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set lastpos-->Node will be added at last pos outside the node
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user