summaryrefslogtreecommitdiff
path: root/src/net/charserverhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/charserverhandler.cpp')
-rw-r--r--src/net/charserverhandler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp
index 01a8756b..a54a17de 100644
--- a/src/net/charserverhandler.cpp
+++ b/src/net/charserverhandler.cpp
@@ -134,6 +134,7 @@ void CharServerHandler::handleMessage(MessageIn *msg)
case 0x0071:
player_node = mCharInfo->getEntry();
+ slot = mCharInfo->getPos();
msg->skip(4); // CharID, must be the same as player_node->charID
map_path = msg->readString(16);
mLoginData->hostname = iptostring(msg->readInt32());
@@ -145,10 +146,14 @@ void CharServerHandler::handleMessage(MessageIn *msg)
{
LocalPlayer *tmp = mCharInfo->getEntry();
if (tmp != player_node)
+ {
delete tmp;
+ mCharInfo->setEntry(0);
+ }
mCharInfo->next();
} while (mCharInfo->getPos());
+ mCharInfo->select(slot);
state = CONNECTING_STATE;
break;