Skip to content
Snippets Groups Projects
Commit 0734ca73 authored by Duane Robertson's avatar Duane Robertson
Browse files

Fix swamp trees.

parent da5af62f
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,6 @@ do
tree_biomes["taiga"] = {"conifer_trees"}
tree_biomes["rainforest"] = {"jungle_trees"}
tree_biomes["rainforest_swamp"] = {"jungle_trees"}
tree_biomes["deciduous_forest_swamp"] = {"deciduous_trees"}
tree_biomes["coniferous_forest"] = {"conifer_trees"}
for i, obiome in pairs(minetest.registered_biomes) do
......@@ -361,7 +360,7 @@ function loud_walking.generate(p_minp, p_maxp, seed)
local y = minp.y + get_height(x - minp.x, z - minp.z, biomes[biome].terrain_scale, ocean) + ground
local ivm = a:index(x, y, z)
if data[ivm + a.ystride] == node("air") and (data[ivm] == node("default:dirt") or data[ivm] == node("default:dirt_with_grass") or data[ivm] == node("default:dirt_with_snow")) then
if (data[ivm + a.ystride] == node("air") or (swamp and data[ivm + a.ystride] == node("default:water_source"))) and (data[ivm] == node("default:dirt") or data[ivm] == node("default:dirt_with_grass") or data[ivm] == node("default:dirt_with_snow")) then
if biomes[biome].special_trees then
--print(dump(biomes[biome].special_trees))
local tree_type = biomes[biome].special_trees[math.random(#biomes[biome].special_trees)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment