forked from mtcontrib/minetest-mod-snow
use the chunksize setting
This commit is contained in:
parent
b994bbc5fd
commit
dee9b5ada1
@ -49,6 +49,7 @@ end
|
|||||||
|
|
||||||
-- caching functions
|
-- caching functions
|
||||||
|
|
||||||
|
local default_sidelen = tonumber(minetest.setting_get("chunksize") or 5)*16-1
|
||||||
local ws_lists = {}
|
local ws_lists = {}
|
||||||
local function get_ws_list(a,x)
|
local function get_ws_list(a,x)
|
||||||
ws_lists[a] = ws_lists[a] or {}
|
ws_lists[a] = ws_lists[a] or {}
|
||||||
@ -57,9 +58,8 @@ local function get_ws_list(a,x)
|
|||||||
return v
|
return v
|
||||||
end
|
end
|
||||||
v = {}
|
v = {}
|
||||||
for x=x,x + (80 - 1) do
|
for x = x, x + default_sidelen do
|
||||||
local y = do_ws_func(a, x)
|
v[x] = do_ws_func(a, x)
|
||||||
v[x] = y
|
|
||||||
end
|
end
|
||||||
ws_lists[a][x] = v
|
ws_lists[a][x] = v
|
||||||
return v
|
return v
|
||||||
|
Loading…
Reference in New Issue
Block a user