single houses are not set to height 0 in the first chunk (as villages are); raised village terrain by 1

master
Sokomine 2014-11-14 01:43:47 +01:00
parent 677ac0c7d7
commit 625600c058
1 changed files with 2 additions and 2 deletions

View File

@ -516,7 +516,7 @@ mg_villages.village_area_get_height = function( village_area, villages, minp, ma
end
end
if( height_count[ village_nr ] > 5 ) then
qmw = math.floor( math.sqrt( qmw / height_count[ village_nr ]) +0.5); -- round the value
qmw = math.floor( math.sqrt( qmw / height_count[ village_nr ]) +1.5); -- round the value
-- a height of 0 would be one below water level; so let's choose something higher;
-- as this may be an island created withhin deep ocean, it might look better if it extends a bit from said ocean
if( qmw < 1 ) then
@ -786,7 +786,7 @@ 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' );
if( mg_villages.all_villages and mg_villages.anz_villages > 0 ) then
if( mg_villages.all_villages and ( not(mg_villages.ENABLE_VILLAGES) or mg_villages.anz_villages > 0 )) then
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
else