summaryrefslogtreecommitdiff
path: root/src/gui/char_server.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-09-26 17:24:37 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-09-26 17:24:37 +0000
commita0fd39a05151848bef85e18e25aa0824bc9cef93 (patch)
tree60f9ed2136268d7570b4716a318e510b2c30d2ce /src/gui/char_server.cpp
parent1a7f56901301fb8fe08f26526f3314b0974626ca (diff)
downloadmana-a0fd39a05151848bef85e18e25aa0824bc9cef93.tar.gz
mana-a0fd39a05151848bef85e18e25aa0824bc9cef93.tar.bz2
mana-a0fd39a05151848bef85e18e25aa0824bc9cef93.tar.xz
mana-a0fd39a05151848bef85e18e25aa0824bc9cef93.zip
Added a nicer handling of when you get disconnected from the server.
Diffstat (limited to 'src/gui/char_server.cpp')
-rw-r--r--src/gui/char_server.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp
index 5c371469..a8f99d8f 100644
--- a/src/gui/char_server.cpp
+++ b/src/gui/char_server.cpp
@@ -107,7 +107,7 @@ void ServerSelectDialog::action(const std::string& eventId)
server_char_server(serverList->getSelected());
}
else if (eventId == "cancel") {
- state = LOGIN;
+ state = LOGIN_STATE;
}
}
@@ -128,14 +128,14 @@ void charServerInputHandler(SDL_KeyboardEvent *keyEvent)
{
if (keyEvent->keysym.sym == SDLK_ESCAPE)
{
- state = LOGIN;
+ state = LOGIN_STATE;
}
}
void server_char_server(int serverIndex)
{
int ret;
- state = LOGIN;
+ state = LOGIN_STATE;
const char *ipstring = iptostring(server_info[serverIndex]->address);
// Connect to char server
@@ -217,7 +217,7 @@ void server_char_server(int serverIndex)
msg.readByte(); // unknown
}
- state = CHAR_SELECT;
+ state = CHAR_SELECT_STATE;
logger->log("CharServer: Player: %s (Packet ID: %x, Length: %d)",
char_info[0]->name.c_str(), msg.getId(), msg.getLength());