forked from Minetest/dynamic_liquid
apparently this helps Lua's garbage collection, it was possible to blow Lua's memory budget by flying very fast but this fixes that.
parent
151d2e034b
commit
572329cfc6
4
init.lua
4
init.lua
|
@ -129,6 +129,8 @@ if not springs then
|
||||||
end
|
end
|
||||||
minetest.register_node("dynamic_liquid:clay", clay_def)
|
minetest.register_node("dynamic_liquid:clay", clay_def)
|
||||||
|
|
||||||
|
local data = {}
|
||||||
|
|
||||||
if springs then
|
if springs then
|
||||||
local c_clay = minetest.get_content_id("default:clay")
|
local c_clay = minetest.get_content_id("default:clay")
|
||||||
local c_spring_clay = minetest.get_content_id("dynamic_liquid:clay")
|
local c_spring_clay = minetest.get_content_id("dynamic_liquid:clay")
|
||||||
|
@ -140,7 +142,7 @@ if springs then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
|
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
|
||||||
local data = vm:get_data()
|
vm:get_data(data)
|
||||||
|
|
||||||
for voxelpos, voxeldata in pairs(data) do
|
for voxelpos, voxeldata in pairs(data) do
|
||||||
if voxeldata == c_clay then
|
if voxeldata == c_clay then
|
||||||
|
|
Loading…
Reference in New Issue