1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Make map generator as much threaded as possible (not much benefit with current generator because of small generator chunk size (a single MapBlock))

This commit is contained in:
Perttu Ahola 2011-11-26 15:53:52 +02:00
parent 769cc9879f
commit b2ccbdffc1
3 changed files with 88 additions and 105 deletions

View file

@ -2162,7 +2162,17 @@ MapBlock* ServerMap::finishBlockMake(mapgen::BlockMakeData *data,
/*infostream<<"Resulting vmanip:"<<std::endl;
data->vmanip.print(infostream);*/
// Make sure affected blocks are loaded
for(s16 x=-1; x<=1; x++)
for(s16 z=-1; z<=1; z++)
for(s16 y=-1; y<=1; y++)
{
v3s16 p(blockpos.X+x, blockpos.Y+y, blockpos.Z+z);
// Load from disk if not already in memory
emergeBlock(p, false);
}
/*
Blit generated stuff to map
NOTE: blitBackAll adds nearly everything to changed_blocks