mirror of
https://github.com/paramat/pathv7.git
synced 2024-12-22 13:52:27 +01:00
Use voxelmanip data buffer memory use optimisation
This commit is contained in:
parent
e8137cdc17
commit
977f5b831c
@ -1,5 +1,5 @@
|
|||||||
pathv7 0.1.4 by paramat
|
pathv7 0.1.5 by paramat
|
||||||
For Minetest 0.4.14 and later
|
For Minetest 0.4.13 and later
|
||||||
Depends default stairs
|
Depends default stairs
|
||||||
Licenses: Code LGPLv2.1, textures CC BY-SA 3.0
|
Licenses: Code LGPLv2.1, textures CC BY-SA 3.0
|
||||||
See license.txt for license information
|
See license.txt for license information
|
||||||
|
7
init.lua
7
init.lua
@ -160,6 +160,11 @@ local nbuf_pathd
|
|||||||
local nbuf_column
|
local nbuf_column
|
||||||
|
|
||||||
|
|
||||||
|
-- Localise data buffer
|
||||||
|
|
||||||
|
local dbuf
|
||||||
|
|
||||||
|
|
||||||
-- On generated function
|
-- On generated function
|
||||||
|
|
||||||
minetest.register_on_generated(function(minp, maxp, seed)
|
minetest.register_on_generated(function(minp, maxp, seed)
|
||||||
@ -201,7 +206,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
|
|
||||||
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
|
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
|
||||||
local area = VoxelArea:new({MinEdge = emin, MaxEdge = emax})
|
local area = VoxelArea:new({MinEdge = emin, MaxEdge = emax})
|
||||||
local data = vm:get_data()
|
local data = vm:get_data(dbuf)
|
||||||
|
|
||||||
local ni = 1
|
local ni = 1
|
||||||
for z = z0 - 3, z1 + 2 do
|
for z = z0 - 3, z1 + 2 do
|
||||||
|
Loading…
Reference in New Issue
Block a user