Quarry: Fix server freeze when max depth is reduced (#487)

Endless loop if max-depth is changed but some quarries are below that new limit
The old comparison (~=) did not account for that
This commit is contained in:
Thomas Rudin 2019-03-02 11:14:05 +01:00 committed by SmallJoker
parent 4f78a69ffc
commit c14521cbd2
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ local function quarry_run(pos, node)
vector.multiply(qdir, -radius))
local owner = meta:get_string("owner")
local nd = meta:get_int("dug")
while nd ~= diameter*diameter * (quarry_dig_above_nodes+1+quarry_max_depth) do
while nd < diameter*diameter * (quarry_dig_above_nodes+1+quarry_max_depth) do
local ry = math.floor(nd / (diameter*diameter))
local ndl = nd % (diameter*diameter)
if ry % 2 == 1 then