Don't print 'Blocks modified by: ' in Map::timerUpdate if no blocks were written
authorPerttu Ahola <celeron55@gmail.com>
Mon, 21 Nov 2011 11:44:10 +0000 (13:44 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 29 Nov 2011 17:13:50 +0000 (19:13 +0200)
src/map.cpp

index 4db5a3d1a68879dae5f8fe831f5d4e0f51b15fa6..13f2a0e984d0ab13e951fa07255de4b8b2738ab2 100644 (file)
@@ -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);
+               }
        }
 }