summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 8358468fc..02626dcd4 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -775,6 +775,15 @@ void Client::stateConnectServer1()
}
}
+void Client::stateWorldSelect1()
+{
+ if (mOldState == STATE_UPDATE)
+ {
+ if (loginHandler->getWorlds().size() < 2)
+ mState = STATE_PRE_LOGIN;
+ }
+}
+
int Client::gameExec()
{
int lastTickTime = tick_time;
@@ -845,10 +854,9 @@ int Client::gameExec()
{
stateConnectServer1();
}
- else if (mState == STATE_WORLD_SELECT && mOldState == STATE_UPDATE)
+ else if (mState == STATE_WORLD_SELECT)
{
- if (loginHandler->getWorlds().size() < 2)
- mState = STATE_PRE_LOGIN;
+ stateWorldSelect1();
}
else if (mOldState == STATE_START ||
(mOldState == STATE_GAME && mState != STATE_GAME))