only blend terrain if it does not already belong to another village
parent
77407d0cad
commit
8c6da7a356
|
@ -55,6 +55,8 @@ mg_villages.village_area_mark_single_house_area = function(village_area, minp, m
|
|||
local flatradn = flatrad + n_absblend * 2 -- vary shape of house flat area
|
||||
local nodrad = math.sqrt(xr ^ 2 + zr ^ 2) -- node radius
|
||||
|
||||
-- only blend the terrain if it does not already belong to another village
|
||||
if( village_area[ x ][ z ][ 2 ] == 0 ) then
|
||||
if x >= (pos.x-1) and x <= (pos.x + pos.bsizex + 1) -- area reserved for house
|
||||
and z >= (pos.z-1) and z <= (pos.z + pos.bsizez + 1) then
|
||||
village_area[ x ][ z ] = {village_nr, 4}
|
||||
|
@ -66,6 +68,7 @@ mg_villages.village_area_mark_single_house_area = function(village_area, minp, m
|
|||
else -- no change to terrain
|
||||
--village_area[xrm][zrm] = {village_nr, 0}
|
||||
end
|
||||
end
|
||||
ni = ni + 1
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue