The subscribe/unsubscribe lobby messages system has been integrated in the client.

This commit is contained in:
lotodore
2008-05-12 10:50:19 +00:00
parent a4cd9aa927
commit d1e0e5e30d
3 changed files with 21 additions and 3 deletions
+12
View File
@@ -981,6 +981,18 @@ ServerLobbyThread::InternalResubscribeMsg(SessionWrapper session)
{
session.sessionData->SetWantsLobbyMsg();
SendGameList(session.sessionData);
// Send new statistics information.
boost::shared_ptr<NetPacket> packet(new NetPacketStatisticsChanged);
NetPacketStatisticsChanged::Data statData;
statData.stats.numberOfPlayersOnServer = m_sessionManager.GetRawSessionCount() + m_gameSessionManager.GetRawSessionCount();
try {
static_cast<NetPacketStatisticsChanged *>(packet.get())->SetData(statData);
GetSender().Send(session.sessionData, packet);
} catch (const NetException &)
{
// Ignore errors for now.
}
}
}