Skip to content

Instantly share code, notes, and snippets.

@kahrl

kahrl/gist:8679721

Created Jan 29, 2014
Embed
What would you like to do?
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