summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-07 22:56:05 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-09 00:29:40 +0300
commiteacf63c7a4c660b38329325c3958bbc63d10ee5c (patch)
treea06eb415526220ce0911c686dd69e9adcf848dd3 /src/client.cpp
parentb384454131c7bd50ba171b1fdbad64cfc83d1ffb (diff)
downloadplus-eacf63c7a4c660b38329325c3958bbc63d10ee5c.tar.gz
plus-eacf63c7a4c660b38329325c3958bbc63d10ee5c.tar.bz2
plus-eacf63c7a4c660b38329325c3958bbc63d10ee5c.tar.xz
plus-eacf63c7a4c660b38329325c3958bbc63d10ee5c.zip
Add support for many update hosts (evol server only).
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 95e49c6aa..98a0fa8fa 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -237,7 +237,7 @@ class LoginListener : public gcn::ActionListener
public:
void action(const gcn::ActionEvent &)
{
- Client::setState(STATE_LOGIN);
+ Client::setState(STATE_PRE_LOGIN);
}
} loginListener;
@@ -945,12 +945,12 @@ int Client::gameExec()
mOldState != STATE_CHOOSE_SERVER &&
Net::getLoginHandler()->isConnected())
{
- mState = STATE_LOGIN;
+ mState = STATE_PRE_LOGIN;
}
else if (mState == STATE_WORLD_SELECT && mOldState == STATE_UPDATE)
{
if (Net::getLoginHandler()->getWorlds().size() < 2)
- mState = STATE_LOGIN;
+ mState = STATE_PRE_LOGIN;
}
else if (mOldState == STATE_START ||
(mOldState == STATE_GAME && mState != STATE_GAME))
@@ -1038,6 +1038,9 @@ int Client::gameExec()
case STATE_CHOOSE_SERVER:
logger->log1("State: CHOOSE SERVER");
+ loginData.clear();
+ serverVersion = 0;
+
// Allow changing this using a server choice dialog
// We show the dialog box only if the command-line
// options weren't set.
@@ -1064,11 +1067,18 @@ int Client::gameExec()
case STATE_CONNECT_SERVER:
logger->log1("State: CONNECT SERVER");
+ loginData.updateHosts.clear();
mCurrentDialog = new ConnectionDialog(
_("Connecting to server"), STATE_SWITCH_SERVER);
TranslationManager::loadCurrentLang();
break;
+ case STATE_PRE_LOGIN:
+ logger->log1("State: PRE_LOGIN");
+// if (serverVersion < 5)
+// setState(STATE_LOGIN);
+ break;
+
case STATE_LOGIN:
logger->log1("State: LOGIN");
// Don't allow an alpha opacity