1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

better support for old maps

This commit is contained in:
Perttu Ahola 2011-04-10 22:50:31 +03:00
parent 3d25fe42f3
commit b0b5c43254
6 changed files with 145 additions and 50 deletions

View file

@ -201,10 +201,20 @@ void * EmergeThread::Thread()
}
else
{
// Get, load or create sector
ServerMapSector *sector =
(ServerMapSector*)map.getSectorNoGenerateNoEx(p2d);
(ServerMapSector*)map.createSector(p2d);
// Generate block
block = map.generateBlock(p, block, sector, changed_blocks,
lighting_invalidated_blocks);
if(block == NULL)
got_block = false;
}
}
else
{
if(block->getLightingExpired()){
lighting_invalidated_blocks[block->getPos()] = block;
}
}