diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-09-15 13:35:35 +0200 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-09-15 13:35:35 +0200 |
commit | 6de8fd28ecb23dccded9c3eabed2f80cde7eb122 (patch) | |
tree | bff3d63e9f3c6753e7fe56372c48e06e69314537 /src/game-server/state.cpp | |
parent | d15190dc8cd8258fcdf06bb615de80bc97a5ac20 (diff) | |
download | manaserv-6de8fd28ecb23dccded9c3eabed2f80cde7eb122.tar.gz manaserv-6de8fd28ecb23dccded9c3eabed2f80cde7eb122.tar.bz2 manaserv-6de8fd28ecb23dccded9c3eabed2f80cde7eb122.tar.xz manaserv-6de8fd28ecb23dccded9c3eabed2f80cde7eb122.zip |
Fixed handling of reconnects while the old connection is still valid
The old connection is now terminated. And the new connection will
receive the character data properly.
Diffstat (limited to 'src/game-server/state.cpp')
-rw-r--r-- | src/game-server/state.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp index 8055c27d..281b80c2 100644 --- a/src/game-server/state.cpp +++ b/src/game-server/state.cpp @@ -524,7 +524,7 @@ void GameState::update(int tick) if (o->getType() == OBJECT_CHARACTER) { o->getComponent<CharacterComponent>()->disconnected(*o); - gameHandler->kill(o); + gameHandler->killConnection(o); } delete o; break; @@ -770,7 +770,7 @@ void GameState::warp(Entity *ptr, MapComposite *map, const Point &point) if (!insert(ptr)) { characterComponent->disconnected(*ptr); - gameHandler->kill(ptr); + gameHandler->killConnection(ptr); delete ptr; } } |