forked from Minetest/dynamic_liquid
prevent occasional giant water cubes
parent
ecbb80ec5f
commit
6dea6d343d
4
init.lua
4
init.lua
|
@ -363,7 +363,7 @@ if mapgen_prefill then
|
||||||
waternodes = {}
|
waternodes = {}
|
||||||
|
|
||||||
local fill_to = function (vi, data, area)
|
local fill_to = function (vi, data, area)
|
||||||
if area:containsi(vi) then
|
if area:containsi(vi) and area:position(vi).y <= water_level then
|
||||||
if data[vi] == c_air then
|
if data[vi] == c_air then
|
||||||
data[vi] = c_water
|
data[vi] = c_water
|
||||||
table.insert(waternodes, vi)
|
table.insert(waternodes, vi)
|
||||||
|
@ -372,7 +372,7 @@ if mapgen_prefill then
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_generated(function(minp, maxp, seed)
|
minetest.register_on_generated(function(minp, maxp, seed)
|
||||||
if minp.y >= water_level or maxp.y < -70 then
|
if minp.y > water_level or maxp.y < -70 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue