Fix compatibility with 5.4
parent
cc064636a9
commit
18c815fbf1
|
@ -20,7 +20,7 @@ local function unsigned(v)
|
||||||
return v % 0x100000000
|
return v % 0x100000000
|
||||||
end
|
end
|
||||||
|
|
||||||
if not bit then
|
if bit == nil then
|
||||||
bit = {}
|
bit = {}
|
||||||
function bit.bxor(a, b)
|
function bit.bxor(a, b)
|
||||||
local a = unsigned(a)
|
local a = unsigned(a)
|
||||||
|
@ -38,8 +38,14 @@ if not bit then
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not vector.metatable then
|
if vector.metatable == nil then
|
||||||
dofile(minetest.get_modpath(minetest.get_current_modname() .. "/vector.lua"))
|
function math.round(x)
|
||||||
|
if x >= 0 then
|
||||||
|
return math.floor(x + 0.5)
|
||||||
|
end
|
||||||
|
return math.ceil(x - 0.5)
|
||||||
|
end
|
||||||
|
dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/vector.lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- End of compatibility stuff
|
-- End of compatibility stuff
|
||||||
|
|
|
@ -436,8 +436,7 @@ local function build_a_village(minp, maxp, pr, placer)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Disable natural generation in singlenode.
|
-- Disable natural generation in singlenode.
|
||||||
if mg_name ~= "singlenode" then
|
if mcl_mapgen.name ~= "singlenode" then
|
||||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
|
||||||
local scan_last_node = mcl_mapgen.LAST_BLOCK * mcl_mapgen.BS - 1
|
local scan_last_node = mcl_mapgen.LAST_BLOCK * mcl_mapgen.BS - 1
|
||||||
local scan_offset = mcl_mapgen.BS
|
local scan_offset = mcl_mapgen.BS
|
||||||
mcl_mapgen.register_mapgen(function(minp, maxp, chunkseed)
|
mcl_mapgen.register_mapgen(function(minp, maxp, chunkseed)
|
||||||
|
|
Loading…
Reference in New Issue