forked from mtcontrib/plantlife_modpack
added rudimentary benchmarking output to chunk processing and tree gen calls
This commit is contained in:
parent
aefb98c60e
commit
2102cf269a
@ -92,6 +92,7 @@ end
|
||||
|
||||
function plantslib:search_for_surfaces(minp, maxp, biomedef, node_or_function_or_model)
|
||||
return function(minp, maxp, blockseed)
|
||||
plantslib:dbg("Started this chunk at "..os.clock())
|
||||
|
||||
local biome = biomedef
|
||||
plantslib:set_defaults(biome)
|
||||
@ -185,7 +186,7 @@ function plantslib:search_for_surfaces(minp, maxp, biomedef, node_or_function_or
|
||||
end
|
||||
end
|
||||
end
|
||||
plantslib:dbg("Finished checking generated area.")
|
||||
plantslib:dbg("Finished this chunk at "..os.clock())
|
||||
end
|
||||
end
|
||||
|
||||
@ -419,13 +420,17 @@ end
|
||||
-- into it.
|
||||
|
||||
function plantslib:generate_tree(pos, node_or_function_or_model)
|
||||
plantslib:dbg("Started this tree at "..os.clock())
|
||||
minetest.env:spawn_tree(pos, node_or_function_or_model)
|
||||
plantslib:dbg("Finished at "..os.clock())
|
||||
end
|
||||
|
||||
-- and this one's for the call used in the growing code
|
||||
|
||||
function plantslib:grow_tree(pos, node_or_function_or_model)
|
||||
plantslib:dbg("Started this tree at "..os.clock())
|
||||
minetest.env:spawn_tree(pos, node_or_function_or_model)
|
||||
plantslib:dbg("Finished at "..os.clock())
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user