summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index eebdaace..2e136e39 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -574,6 +574,10 @@ int Client::exec()
if (mState != mOldState)
{
+ Net::GeneralHandler *generalHandler = Net::getGeneralHandler();
+ if (generalHandler)
+ generalHandler->stateChanged(mOldState, mState);
+
if (mOldState == STATE_GAME)
{
delete game;
@@ -774,13 +778,20 @@ int Client::exec()
STATE_SWITCH_CHARACTER);
break;
+ case STATE_CHANGE_MAP:
+ logger->log("State: CHANGE_MAP");
+
+ Net::getGameHandler()->connect();
+ mCurrentDialog = new ConnectionDialog(
+ _("Changing game servers"),
+ STATE_SWITCH_CHARACTER);
+ break;
+
case STATE_GAME:
logger->log("Memorizing selected character %s",
player_node->getName().c_str());
config.setValue("lastCharacter", player_node->getName());
- Net::getGameHandler()->inGame();
-
// Fade out logon-music here too to give the desired effect
// of "flowing" into the game.
sound.fadeOutMusic(1000);