extract serialize code from Server; deserialize code from Game; add Slot collection.

This commit is contained in:
Chris Forbes
2010-08-23 19:08:09 +12:00
parent 3880326787
commit d8c5f1aed3
4 changed files with 58 additions and 34 deletions

View File

@@ -450,14 +450,8 @@ namespace OpenRA.Server
static void SyncLobbyInfo()
{
var clientData = lobbyInfo.Clients.ToDictionary(
a => a.Index.ToString(),
a => FieldSaver.Save(a));
clientData["GlobalSettings"] = FieldSaver.Save(lobbyInfo.GlobalSettings);
DispatchOrders(null, 0,
new ServerOrder("SyncInfo", clientData.WriteToString()).Serialize());
new ServerOrder("SyncInfo", lobbyInfo.Serialize()).Serialize());
PingMasterServer();
}