summaryrefslogtreecommitdiff
path: root/src/net/charserverhandler.cpp
diff options
context:
space:
mode:
authorRogier Polak <rogier.l.a.polak@gmail.com>2007-02-25 15:12:43 +0000
committerRogier Polak <rogier.l.a.polak@gmail.com>2007-02-25 15:12:43 +0000
commit0ee4b4d0229d8513eb2a71cc735d8807fde57f29 (patch)
tree9a462fb8af3d13c813742e4d20ff7f0fb1b7deb8 /src/net/charserverhandler.cpp
parent775404c84c3250225d43f10c4a5363e997618cb2 (diff)
downloadmana-0ee4b4d0229d8513eb2a71cc735d8807fde57f29.tar.gz
mana-0ee4b4d0229d8513eb2a71cc735d8807fde57f29.tar.bz2
mana-0ee4b4d0229d8513eb2a71cc735d8807fde57f29.tar.xz
mana-0ee4b4d0229d8513eb2a71cc735d8807fde57f29.zip
Fixed small issue concerning SDL timers, removed a useless variable.
Diffstat (limited to 'src/net/charserverhandler.cpp')
-rw-r--r--src/net/charserverhandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp
index f715b434..848b97fb 100644
--- a/src/net/charserverhandler.cpp
+++ b/src/net/charserverhandler.cpp
@@ -71,7 +71,6 @@ CharServerHandler::handleMessage(MessageIn &msg)
delete mCharInfo->getEntry();
mCharInfo->setEntry(0);
mCharInfo->unlock();
- n_character--;
new OkDialog("Info", "Player deleted");
}
// Character deletion failed
@@ -100,7 +99,6 @@ CharServerHandler::handleMessage(MessageIn &msg)
mCharInfo->unlock();
mCharInfo->select(slot);
mCharInfo->setEntry(tempPlayer);
- n_character++;
break;
case APMSG_CHAR_SELECT_RESPONSE:
@@ -184,6 +182,7 @@ CharServerHandler::handleCharSelectResponse(MessageIn &msg)
player_node = mCharInfo->getEntry();
mCharInfo->unlock();
mCharInfo->select(0);
+
do {
LocalPlayer *tmp = mCharInfo->getEntry();
if (tmp != player_node)
@@ -191,6 +190,8 @@ CharServerHandler::handleCharSelectResponse(MessageIn &msg)
mCharInfo->next();
} while (mCharInfo->getPos());
+ mCharInfo->clear(); //player_node will be deleted by ~Game
+
state = STATE_CONNECT_GAME;
}
}