mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
cleanup
This commit is contained in:
parent
895a496f6e
commit
2475a7e8f5
20 changed files with 88 additions and 79 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "debug/Logger.hpp"
|
||||
#include "engine/Engine.hpp"
|
||||
#include "engine/EnginePaths.hpp"
|
||||
#include "world/files/WorldFiles.hpp"
|
||||
#include "maths/voxmaths.hpp"
|
||||
#include "objects/Entities.hpp"
|
||||
|
|
@ -22,9 +23,10 @@
|
|||
static debug::Logger logger("level-control");
|
||||
|
||||
LevelController::LevelController(
|
||||
Engine* engine, std::unique_ptr<Level> levelPtr, Player* clientPlayer
|
||||
Engine& engine, std::unique_ptr<Level> levelPtr, Player* clientPlayer
|
||||
)
|
||||
: settings(engine->getSettings()),
|
||||
: engine(engine),
|
||||
settings(engine.getSettings()),
|
||||
level(std::move(levelPtr)),
|
||||
chunks(std::make_unique<ChunksController>(*level)),
|
||||
playerTickClock(20, 3) {
|
||||
|
|
@ -147,6 +149,7 @@ void LevelController::saveWorld() {
|
|||
|
||||
void LevelController::onWorldQuit() {
|
||||
scripting::on_world_quit();
|
||||
engine.getPaths().setCurrentWorldFolder("");
|
||||
}
|
||||
|
||||
Level* LevelController::getLevel() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue