Skip to content

Instantly share code, notes, and snippets.

@kahrl
Created January 29, 2014 01:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kahrl/8679721 to your computer and use it in GitHub Desktop.
Save kahrl/8679721 to your computer and use it in GitHub Desktop.
diff --git a/src/environment.cpp b/src/environment.cpp
index 5249dd9..a64a33b 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -389,6 +389,7 @@ void ServerEnvironment::serializePlayers(const std::string &savedir)
std::set<Player*> saved_players;
std::vector<fs::DirListNode> player_files = fs::GetDirListing(players_path);
+ u32 unmodified_count = 0;
for(u32 i=0; i<player_files.size(); i++)
{
if(player_files[i].dir || player_files[i].name[0] == '.')
@@ -439,8 +440,11 @@ void ServerEnvironment::serializePlayers(const std::string &savedir)
saved_players.insert(player);
} else {
saved_players.insert(player);
+ unmodified_count++;
}
}
+ dstream<<"checkModified returned false for "<<unmodified_count
+ <<" players"<<std::endl;
for(std::list<Player*>::iterator i = m_players.begin();
i != m_players.end(); ++i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment