From cef31621a37974df2b789660f1447863793b70d3 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Wed, 31 Dec 2014 00:20:18 +0100 Subject: [PATCH] fixed village height for very first village --- mapgen.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mapgen.lua b/mapgen.lua index 0eca91b..63a0875 100644 --- a/mapgen.lua +++ b/mapgen.lua @@ -808,7 +808,12 @@ mg_villages.place_villages_via_voxelmanip = function( villages, minp, maxp, vm, -- determine optimal height for all villages that have their center in this mapchunk; sets village.optimal_height t1 = time_elapsed( t1, 'get_height' ); + mg_villages.village_area_get_height( village_area, villages, tmin, tmax, data, param2_data, a, cid ); + -- the villages in the first mapchunk are set to a fixed height of 1 so that players will not end up embedded in stone + if( not( mg_villages.all_villages ) or mg_villages.anz_villages < 1 ) then + villages[1].optimal_height = 1; + end -- change height of those villages where an optimal_height could be determined