mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 06:51:51 +00:00
fix LevelController::processBeforeQuit
This commit is contained in:
parent
afe0db2275
commit
0711a2d23e
1 changed files with 5 additions and 2 deletions
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue