mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Dont write player files all the time
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user