fix bug regarding single houses beeing ignored in some situations
This commit is contained in:
parent
9f8d6d8916
commit
50a7fe11dd
@ -930,8 +930,8 @@ mg_villages.houses_in_mapchunk = function( minp, mapchunk_size, villages )
|
||||
local d = math.ceil( mapchunk_size / 2 );
|
||||
for _,candidate in ipairs(village_candidates) do
|
||||
if( not( candidate.areas_intersect )
|
||||
and (candidate.vx > minp.x - d or candidate.vx < (mapchunk_size+d) )
|
||||
and (candidate.vz > minp.z - d or candidate.vz < (mapchunk_size+d) )) then
|
||||
and (candidate.vx > minp.x - d or candidate.vx < (minp.x+mapchunk_size+d) )
|
||||
and (candidate.vz > minp.z - d or candidate.vz < (minp.z+mapchunk_size+d) )) then
|
||||
table.insert( villages, candidate );
|
||||
|
||||
-- there may be quite a lot of single houses added; plus they are less intresting than entire villages. Thus, logfile spam is reduced
|
||||
|
Loading…
x
Reference in New Issue
Block a user