forked from MineClone5/MineClone5
Don't crash if liquid_range==nil for liquids
This commit is contained in:
parent
1274df70a7
commit
b1b73dd100
|
@ -112,9 +112,10 @@ local liquid_flow_action = function(pos, group, action)
|
|||
* 1: Item must be in liquid group
|
||||
* 2a: If target node is below liquid, always succeed
|
||||
* 2b: If target node is horizontal to liquid: succeed if source, otherwise check param2 for horizontal flow direction ]]
|
||||
local range = d.liquid_range or 8
|
||||
if (minetest.get_item_group(n.name, group) ~= 0) and
|
||||
((yp > 0) or
|
||||
(yp == 0 and ((d.liquidtype == "source") or (n.param2 > (8-d.liquid_range) and n.param2 < 9)))) then
|
||||
(yp == 0 and ((d.liquidtype == "source") or (n.param2 > (8-range) and n.param2 < 9)))) then
|
||||
action(pos)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue