summaryrefslogtreecommitdiff
path: root/src/net/ea/playerhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea/playerhandler.cpp')
-rw-r--r--src/net/ea/playerhandler.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 00230ea3..534c1b7b 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -24,6 +24,7 @@
#include "net/ea/protocol.h"
#include "net/messagein.h"
+#include "net/messageout.h"
#include "engine.h"
#include "localplayer.h"
@@ -33,7 +34,6 @@
#include "gui/buy.h"
#include "gui/buysell.h"
-#include "gui/chat.h"
#include "gui/gui.h"
#include "gui/npc_text.h"
#include "gui/npcintegerdialog.h"
@@ -45,6 +45,8 @@
#include "gui/storagewindow.h"
#include "gui/viewport.h"
+#include "gui/widgets/chattab.h"
+
#include "utils/stringutils.h"
#include "utils/gettext.h"
@@ -91,7 +93,8 @@ namespace {
sellDialog->setVisible(false);
buySellDialog->setVisible(false);
- if (storageWindow->isVisible()) storageWindow->close();
+ if (storageWindow->isVisible())
+ storageWindow->close();
}
} deathListener;
@@ -192,7 +195,9 @@ void PlayerHandler::handleMessage(MessageIn &msg)
nearby = (engine->getCurrentMapName() == mapPath);
// Switch the actual map, deleting the previous one if necessary
- engine->changeMap(mapPath);
+ mapPath = mapPath.substr(0, mapPath.rfind("."));
+ if (engine->changeMap(mapPath))
+ MessageOut outMsg(CMSG_MAP_LOADED);
float scrollOffsetX = 0.0f;
float scrollOffsetY = 0.0f;