Game List is now dynamically updated.

This commit is contained in:
lotodore
2007-08-21 19:50:13 +00:00
parent 3a2f3255af
commit 388db7c16a
6 changed files with 85 additions and 17 deletions
+9 -1
View File
@@ -476,7 +476,15 @@ ClientStateWaitJoin::InternalProcess(ClientThread &client, boost::shared_ptr<Net
// A new game was created on the server.
NetPacketGameListNew::Data gameListNewData;
packet->ToNetPacketGameListNew()->GetData(gameListNewData);
client.AddGameInformation(gameListNewData.gameName, gameListNewData.gameId);
client.AddGameInformation(gameListNewData.gameId, gameListNewData.gameName);
}
else if (packet->ToNetPacketGameListUpdate())
{
// An existing game was updated on the server.
NetPacketGameListUpdate::Data gameListUpdateData;
packet->ToNetPacketGameListUpdate()->GetData(gameListUpdateData);
if (gameListUpdateData.gameMode == GAME_MODE_CLOSED)
client.RemoveGameInformation(gameListUpdateData.gameId);
}
else if (packet->ToNetPacketJoinGameAck())
{