aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-25 18:08:47 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:51 +0200
commit651657edfd2912d045f0d49dde550b551c817760 (patch)
treea041c6ecbd771445ebba270c673ef24b0da40c52
parent74770ab71818a16b49274ac2261c0577cbdccfce (diff)
downloadminetest-651657edfd2912d045f0d49dde550b551c817760.tar.gz
minetest-651657edfd2912d045f0d49dde550b551c817760.tar.bz2
minetest-651657edfd2912d045f0d49dde550b551c817760.zip
Print out number of blocks in memory at unload
-rw-r--r--src/map.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 3f858ed67..fd0f1e313 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1405,6 +1405,7 @@ void Map::timerUpdate(float dtime, float unload_timeout,
core::list<v2s16> sector_deletion_queue;
u32 deleted_blocks_count = 0;
u32 saved_blocks_count = 0;
+ u32 block_count_all = 0;
core::map<v2s16, MapSector*>::Iterator si;
@@ -1450,6 +1451,7 @@ void Map::timerUpdate(float dtime, float unload_timeout,
else
{
all_blocks_deleted = false;
+ block_count_all++;
}
}
@@ -1470,6 +1472,7 @@ void Map::timerUpdate(float dtime, float unload_timeout,
<<" blocks from memory";
if(save_before_unloading)
infostream<<", of which "<<saved_blocks_count<<" were written";
+ infostream<<", "<<block_count_all<<" blocks in memory";
infostream<<"."<<std::endl;
if(saved_blocks_count != 0){
PrintInfo(infostream); // ServerMap/ClientMap: