forked from mtcontrib/minetest-mod-snow
		
	mapgen: Fix crashes when smooth transition is disabled
This commit is contained in:
		@@ -255,7 +255,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
 | 
			
		||||
		if not in_biome then
 | 
			
		||||
			if alpine
 | 
			
		||||
			and test
 | 
			
		||||
			and test > smooth_rarity_min then
 | 
			
		||||
			and test > (smooth and smooth_rarity_min or nosmooth_rarity) then
 | 
			
		||||
				-- remove trees near alpine
 | 
			
		||||
				local ground_y
 | 
			
		||||
				if data[area:index(x, maxp.y, z)] == c.air then
 | 
			
		||||
@@ -345,7 +345,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
 | 
			
		||||
						data[area:index(x, ground_y+1, z)] = c.dry_shrub
 | 
			
		||||
					else
 | 
			
		||||
						if snowy
 | 
			
		||||
						or test > smooth_rarity_max then
 | 
			
		||||
						or test > (smooth and smooth_rarity_max or
 | 
			
		||||
								nosmooth_rarity) then
 | 
			
		||||
							-- more, deeper snow
 | 
			
		||||
							data[node] = c.snow_block
 | 
			
		||||
						else
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user