aboutsummaryrefslogtreecommitdiff
path: root/src/environment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/environment.cpp')
-rw-r--r--src/environment.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/environment.cpp b/src/environment.cpp
index 4b785998b..21a6258b7 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -434,6 +434,7 @@ void ServerEnvironment::serializePlayers(const std::string &savedir)
//infostream<<"Found matching player, overwriting."<<std::endl;
// OK, found. Save player there.
+ if(player->checkModified())
{
// Open file and serialize
std::ofstream os(path.c_str(), std::ios_base::binary);
@@ -444,6 +445,8 @@ void ServerEnvironment::serializePlayers(const std::string &savedir)
}
player->serialize(os);
saved_players.insert(player);
+ } else {
+ saved_players.insert(player);
}
}