summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-21 13:44:10 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:50 +0200
commit251b015210f55f028fdde8035928c7cf893fce75 (patch)
tree4ae2d7d175283beeb6497ace76387f270fc49bdb
parent616bad96afd9c4f507d7c94e13dbd09f54913a69 (diff)
downloadminetest-251b015210f55f028fdde8035928c7cf893fce75.tar.gz
minetest-251b015210f55f028fdde8035928c7cf893fce75.tar.bz2
minetest-251b015210f55f028fdde8035928c7cf893fce75.zip
Don't print 'Blocks modified by: ' in Map::timerUpdate if no blocks were written
-rw-r--r--src/map.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 4db5a3d1a..13f2a0e98 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1463,9 +1463,11 @@ void Map::timerUpdate(float dtime, float unload_timeout,
if(save_before_unloading)
infostream<<", of which "<<saved_blocks_count<<" were written";
infostream<<"."<<std::endl;
- PrintInfo(infostream); // ServerMap/ClientMap:
- infostream<<"Blocks modified by: "<<std::endl;
- modprofiler.print(infostream);
+ if(saved_blocks_count != 0){
+ PrintInfo(infostream); // ServerMap/ClientMap:
+ infostream<<"Blocks modified by: "<<std::endl;
+ modprofiler.print(infostream);
+ }
}
}