Show and update admin player of a game even when in lobby and not in the game.

This commit is contained in:
lotodore
2007-10-12 14:32:25 +00:00
parent 96d1f34f5c
commit 4f00333599
21 changed files with 227 additions and 22 deletions
+17
View File
@@ -784,6 +784,23 @@ ClientThread::UpdateGameInfoMode(unsigned gameId, GameMode mode)
GetCallback().SignalNetClientGameListUpdateMode(gameId, mode);
}
void
ClientThread::UpdateGameInfoAdmin(unsigned gameId, unsigned adminPlayerId)
{
bool found = false;
{
boost::mutex::scoped_lock lock(m_gameInfoMapMutex);
GameInfoMap::iterator pos = m_gameInfoMap.find(gameId);
if (pos != m_gameInfoMap.end())
{
found = true;
(*pos).second.adminPlayerId = adminPlayerId;
}
}
if (found)
GetCallback().SignalNetClientGameListUpdateAdmin(gameId, adminPlayerId);
}
void
ClientThread::RemoveGameInfo(unsigned gameId)
{