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:
parent
23ea02c79c
commit
70672e1cb7
3 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue