Minor refactor and fixes

This commit is contained in:
MihailRis
2023-11-16 10:53:34 +03:00
parent 1b935aa081
commit 5175c9be92
4 changed files with 12 additions and 10 deletions
+3 -7
View File
@@ -72,7 +72,6 @@ MenuScreen::MenuScreen(Engine* engine_) : Screen(engine_) {
});
panel->add(shared_ptr<UINode>(button));
}
this->panel = shared_ptr<UINode>(panel);
engine->getGUI()->add(this->panel);
}
@@ -100,15 +99,12 @@ LevelScreen::~LevelScreen() {
delete hud;
delete worldRenderer;
std::cout << "-- writing world" << std::endl;
World* world = level->world;
std::cout << "-- saving world" << std::endl;
world->write(level, !engine->getSettings().debug.generatorTestMode);
delete world;
delete level;
delete world;
}
void LevelScreen::updateHotkeys() {
@@ -151,4 +147,4 @@ void LevelScreen::draw(float delta) {
if (level->player->debug) {
hud->drawDebug( 1 / delta, occlusion);
}
}
}