summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 95f2cb1b..a0e475f6 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -58,6 +58,10 @@ bool Engine::changeMap(const std::string &mapPath)
floorItemManager->clear();
beingManager->clear();
+ // Close the popup menu on map change so that invalid options can't be
+ // executed.
+ viewport->closePopupMenu();
+
// Unset the map of the player so that its particles are cleared before
// being deleted in the next step
if (player_node)
@@ -144,7 +148,5 @@ void Engine::logic()
{
beingManager->logic();
particleEngine->update();
- if (mCurrentMap)
- mCurrentMap->update();
gui->logic();
}