fix LevelController::processBeforeQuit

This commit is contained in:
MihailRis 2025-11-20 21:27:56 +03:00
parent afe0db2275
commit 0711a2d23e

View File

@ -123,8 +123,11 @@ void LevelController::update(float delta, bool pause) {
} }
void LevelController::processBeforeQuit() { void LevelController::processBeforeQuit() {
if (localPlayer) { // todo: move somewhere else
localPlayer->chunks->saveAndClear(); for (auto player : level->players->getAll()) {
if (player->chunks) {
player->chunks->saveAndClear();
}
} }
scripting::process_before_quit(); scripting::process_before_quit();
} }