From 977f5b831c0af654420b4cdad95f27851f4a83ce Mon Sep 17 00:00:00 2001 From: paramat Date: Sun, 18 Dec 2016 02:32:48 +0000 Subject: Use voxelmanip data buffer memory use optimisation --- README.txt | 4 ++-- init.lua | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.txt b/README.txt index caa29e1..9f1f4ca 100644 --- a/README.txt +++ b/README.txt @@ -1,5 +1,5 @@ -pathv7 0.1.4 by paramat -For Minetest 0.4.14 and later +pathv7 0.1.5 by paramat +For Minetest 0.4.13 and later Depends default stairs Licenses: Code LGPLv2.1, textures CC BY-SA 3.0 See license.txt for license information diff --git a/init.lua b/init.lua index 00b2766..ce6706e 100644 --- a/init.lua +++ b/init.lua @@ -160,6 +160,11 @@ local nbuf_pathd local nbuf_column +-- Localise data buffer + +local dbuf + + -- On generated function 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 area = VoxelArea:new({MinEdge = emin, MaxEdge = emax}) - local data = vm:get_data() + local data = vm:get_data(dbuf) local ni = 1 for z = z0 - 3, z1 + 2 do -- cgit v1.2.3