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

Added a mapblock analyzing function for debugging use and fixed remaining mapgen bugs

This commit is contained in:
Perttu Ahola 2011-07-24 12:09:33 +03:00
parent ed8f5576a5
commit 29d905f98a
5 changed files with 179 additions and 19 deletions

View file

@ -2264,7 +2264,26 @@ MapBlock* ServerMap::finishBlockMake(mapgen::BlockMakeData *data,
/*dstream<<"finishBlockMake() done for ("<<blockpos.X<<","<<blockpos.Y<<","
<<blockpos.Z<<")"<<std::endl;*/
#if 0
if(enable_mapgen_debug_info)
{
/*
Analyze resulting blocks
*/
for(s16 x=-1; x<=1; x++)
for(s16 y=-1; y<=1; y++)
for(s16 z=-1; z<=1; z++)
{
v3s16 p = block->getPos()+v3s16(x,y,z);
MapBlock *block = getBlockNoCreateNoEx(p);
char spos[20];
snprintf(spos, 20, "(%2d,%2d,%2d)", x, y, z);
dstream<<"Generated "<<spos<<": "
<<analyze_block(block)<<std::endl;
}
}
#endif
return block;
}