Fix itrainmap
This commit is contained in:
parent
af14d57557
commit
c79be69aef
|
@ -72,12 +72,15 @@ end
|
||||||
local function cache_ndb()
|
local function cache_ndb()
|
||||||
itm_cache={}
|
itm_cache={}
|
||||||
local ndb_nodes=advtrains.ndb.get_nodes()
|
local ndb_nodes=advtrains.ndb.get_nodes()
|
||||||
for phs,_ in pairs(ndb_nodes) do
|
for y, xzt in pairs(ndb_nodes) do
|
||||||
local pos=minetest.get_position_from_hash(phs)
|
for x, zt in pairs(xzt) do
|
||||||
if not itm_cache[pos.x] then
|
for z, _ in pairs(zt) do
|
||||||
itm_cache[pos.x]={}
|
if not itm_cache[x] then
|
||||||
|
itm_cache[x]={}
|
||||||
|
end
|
||||||
|
itm_cache[x][z]=y
|
||||||
|
end
|
||||||
end
|
end
|
||||||
itm_cache[pos.x][pos.z]=pos.y
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue