summaryrefslogtreecommitdiff
path: root/src/net/ea/playerhandler.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-03-29 18:33:44 +0200
committerPhilipp Sehmisch <crush@themanaworld.org>2009-03-29 18:33:44 +0200
commit9587fb9b86ee4081ba14d23c1133bf1a09ee4578 (patch)
tree7682df3ec17534be553caae85ffa9e5a68c9a815 /src/net/ea/playerhandler.cpp
parent63b41440a0555c6b39141eab94ef4627f712b476 (diff)
parent8748f26234bba1e71bbe059147fb02256f8cec2a (diff)
downloadmana-client-9587fb9b86ee4081ba14d23c1133bf1a09ee4578.tar.gz
mana-client-9587fb9b86ee4081ba14d23c1133bf1a09ee4578.tar.bz2
mana-client-9587fb9b86ee4081ba14d23c1133bf1a09ee4578.tar.xz
mana-client-9587fb9b86ee4081ba14d23c1133bf1a09ee4578.zip
Merge branch 'master' of git@gitorious.org:tmw/mainline
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;