1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Force player save before kicking on player shutdown (#8157)

This commit is contained in:
Loïc Blot 2019-02-03 09:11:45 +01:00 committed by GitHub
parent 23ea02c79c
commit 70672e1cb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View file

@ -568,10 +568,10 @@ void ServerEnvironment::kickAllPlayers(AccessDeniedCode reason,
}
}
void ServerEnvironment::saveLoadedPlayers()
void ServerEnvironment::saveLoadedPlayers(bool force)
{
for (RemotePlayer *player : m_players) {
if (player->checkModified() || (player->getPlayerSAO() &&
if (force || player->checkModified() || (player->getPlayerSAO() &&
player->getPlayerSAO()->getMeta().isModified())) {
try {
m_player_database->savePlayer(player);