1
0
mirror of https://github.com/Splizard/minetest-mod-snow.git synced 2024-12-29 16:00:16 +01:00

Fix node == nil bug. Reported on the forums.

This commit is contained in:
Splizard 2014-10-27 10:36:35 +13:00
parent 4d696c4843
commit 37ecfd02a8

View File

@ -87,6 +87,11 @@ function snow.place(pos)
drawtype = minetest.registered_nodes[node.name].drawtype
end
--Oops, maybe there is no node?
if node == nil then
return
end
local bnode = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
if node.name == "default:snow" and minetest.get_node_level(pos) < 63 then
if minetest.get_item_group(bnode.name, "leafdecay") == 0 and snow.is_uneven(pos) ~= true then