mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-22 16:09:33 +01:00
Don't crash if liquid_range==nil for liquids
This commit is contained in:
parent
1274df70a7
commit
b1b73dd100
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue