More work on rejoin. This is still broken because the player id is not yet updated on client side, and the server still does not activate the rejoining player.
This commit is contained in:
1 parent
945a8f4588
commit
2488ea43cd
6 files changed
+177
-48
No files matched your search
@@ -1314,13 +1314,7 @@ ServerLobbyThread::HandleNetPacketRejoinGame(boost::shared_ptr<SessionData> sess
|
||||
|
||||
if (pos != m_gameMap.end()) {
|
||||
boost::shared_ptr<ServerGame> game = pos->second;
|
||||
// Verify that the user is allowed to rejoin.
|
||||
boost::shared_ptr<PlayerInterface> tmpPlayer = game->GetPlayerInterfaceFromGame(session->GetPlayerData()->GetName());
|
||||
if (tmpPlayer && tmpPlayer->getMyGuid() == session->GetPlayerData()->GetOldGuid()) {
|
||||
MoveSessionToGame(game, session, autoLeave);
|
||||
} else {
|
||||
SendJoinGameFailed(session, rejoinGame.gameId, NTF_NET_JOIN_REJOIN_FAILED);
|
||||
}
|
||||
MoveSessionToGame(game, session, autoLeave);
|
||||
} else {
|
||||
SendJoinGameFailed(session, rejoinGame.gameId, NTF_NET_JOIN_GAME_INVALID);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user