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:
lotodore
2011-09-11 20:38:18 +00:00
parent 945a8f4588
commit 2488ea43cd
6 changed files with 177 additions and 48 deletions
+16
View File
@@ -627,6 +627,22 @@ ServerGame::SetPlayerAutoLeaveOnFinish(unsigned playerId)
m_autoLeavePlayerList.push_back(playerId);
}
void
ServerGame::AddRejoinPlayer(unsigned playerId)
{
boost::mutex::scoped_lock lock(m_rejoinPlayerListMutex);
m_rejoinPlayerList.push_back(playerId);
}
PlayerIdList
ServerGame::GetAndResetRejoinPlayers()
{
boost::mutex::scoped_lock lock(m_rejoinPlayerListMutex);
PlayerIdList tmpList(m_rejoinPlayerList);
m_rejoinPlayerList.clear();
return tmpList;
}
void
ServerGame::AddComputerPlayer(boost::shared_ptr<PlayerData> player)
{