fix world previews generation

This commit is contained in:
MihailRis
2025-11-22 19:23:46 +03:00
parent acea4604fe
commit 6bc549dd90
5 changed files with 38 additions and 25 deletions
+1
View File
@@ -122,6 +122,7 @@ void LevelController::update(float delta, bool pause) {
}
void LevelController::processBeforeQuit() {
preQuitCallbacks.notify();
// todo: move somewhere else
for (auto player : level->players->getAll()) {
if (player->chunks) {
+3
View File
@@ -5,6 +5,7 @@
#include "BlocksController.hpp"
#include "ChunksController.hpp"
#include "util/Clock.hpp"
#include "util/CallbacksSet.hpp"
class Engine;
class Level;
@@ -21,6 +22,8 @@ class LevelController {
util::Clock playerTickClock;
public:
CallbacksSet<> preQuitCallbacks;
LevelController(Engine* engine, std::unique_ptr<Level> level, Player* clientPlayer);
/// @param delta time elapsed since the last update