mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 15:33:00 +00:00
//erode river: comment debug
...we might need them again in the future
This commit is contained in:
parent
ccf27c8629
commit
74bde4e60c
1 changed files with 6 additions and 5 deletions
|
@ -29,8 +29,8 @@ function worldeditadditions.erode.river(heightmap_initial, heightmap, heightmap_
|
||||||
local filled = 0
|
local filled = 0
|
||||||
local removed = 0
|
local removed = 0
|
||||||
for i=1,params.steps do
|
for i=1,params.steps do
|
||||||
print("[DEBUG:river] step ", i)
|
-- print("[DEBUG:river] step ", i)
|
||||||
wea.format.array_2d(heightmap, heightmap_size.x)
|
-- wea.format.array_2d(heightmap, heightmap_size.x)
|
||||||
local time_start = wea.get_ms_time()
|
local time_start = wea.get_ms_time()
|
||||||
|
|
||||||
-- Store up changes to make and make them at the end of the step
|
-- Store up changes to make and make them at the end of the step
|
||||||
|
@ -42,7 +42,7 @@ function worldeditadditions.erode.river(heightmap_initial, heightmap, heightmap_
|
||||||
for x = heightmap_size.x - 1, 0, -1 do
|
for x = heightmap_size.x - 1, 0, -1 do
|
||||||
local hi = z*heightmap_size.x + x
|
local hi = z*heightmap_size.x + x
|
||||||
local thisheight = heightmap[hi]
|
local thisheight = heightmap[hi]
|
||||||
print("[DEBUG:river] z", z, "x", x, "thisheight", thisheight)
|
-- print("[DEBUG:river] z", z, "x", x, "thisheight", thisheight)
|
||||||
|
|
||||||
local height_up = heightmap[hi]
|
local height_up = heightmap[hi]
|
||||||
local height_down = heightmap[hi]
|
local height_down = heightmap[hi]
|
||||||
|
@ -96,7 +96,7 @@ function worldeditadditions.erode.river(heightmap_initial, heightmap, heightmap_
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
print("[DEBUG:river] sides_higher", sides_higher, "sides_lower", sides_lower, "action", action)
|
|
||||||
if action == "fill" and params.doraise then
|
if action == "fill" and params.doraise then
|
||||||
table.insert(fill, hi)
|
table.insert(fill, hi)
|
||||||
filled = filled + 1
|
filled = filled + 1
|
||||||
|
@ -104,7 +104,8 @@ function worldeditadditions.erode.river(heightmap_initial, heightmap, heightmap_
|
||||||
table.insert(remove, hi)
|
table.insert(remove, hi)
|
||||||
removed = removed + 1
|
removed = removed + 1
|
||||||
end
|
end
|
||||||
wea.format.array_2d(heightmap, heightmap_size.x)
|
-- print("[DEBUG:river] sides_higher", sides_higher, "sides_lower", sides_lower, "action", action)
|
||||||
|
-- wea.format.array_2d(heightmap, heightmap_size.x)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue