summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-07-24 12:09:33 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-07-24 12:09:33 +0300
commit29d905f98a8ce7db9ae78a572b51d479f04fb48d (patch)
tree4d5419980a43b8407251a22bd7f8147984e5a105 /src/map.cpp
parented8f5576a5ca8adb8505295fc56019b1cbb4d8ad (diff)
downloadminetest-29d905f98a8ce7db9ae78a572b51d479f04fb48d.tar.gz
minetest-29d905f98a8ce7db9ae78a572b51d479f04fb48d.tar.bz2
minetest-29d905f98a8ce7db9ae78a572b51d479f04fb48d.zip
Added a mapblock analyzing function for debugging use and fixed remaining mapgen bugs
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/map.cpp b/src/map.cpp
index f0ea2f6f1..b205d9918 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -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;
}