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:
parent
769cc9879f
commit
b2ccbdffc1
3 changed files with 88 additions and 105 deletions
12
src/map.cpp
12
src/map.cpp
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue