gameServer/HWProtoLobbyState.hs
changeset 4941 90572c338e60
parent 4936 d65d438acd23
child 4942 1c85a8e6e11c
--- a/gameServer/HWProtoLobbyState.hs	Mon Feb 14 08:31:45 2011 -0500
+++ b/gameServer/HWProtoLobbyState.hs	Tue Feb 15 21:12:22 2011 +0300
@@ -40,12 +40,9 @@
                 showB $ playersIn r,
                 showB $ length $ teams r,
                 nick $ irnc `client` masterID r,
-                head (Map.findWithDefault ["+gen+"] "MAP" (params r)),
+                head (Map.findWithDefault ["+rnd+"] "MAP" (mapParams r)),
                 head (Map.findWithDefault ["Default"] "SCHEME" (params r)),
-                head (Map.findWithDefault ["Default"] "AMMO" (params r)),
-                head (Map.findWithDefault ["Default"] "SCHEME" (params r)),
-                head (Map.findWithDefault ["0"] "MAPGEN" (params r)),
-                head (Map.findWithDefault ["seed"] "SEED" (params r))
+                head (Map.findWithDefault ["Default"] "AMMO" (params r))
                 ]
 
 
@@ -96,7 +93,7 @@
                 AnswerClients chans ["CLIENT_FLAGS", "-r", nick cl]
             ]
             ++ map (readynessMessage cl) jRoomClients
-            ++ answerFullConfig cl (params jRoom)
+            ++ answerFullConfig cl (mapParams jRoom) (params jRoom)
             ++ answerTeams cl jRoom
             ++ watchRound cl jRoom
 
@@ -105,10 +102,10 @@
 
         toAnswer cl (paramName, paramStrs) = AnswerClients [sendChan cl] $ "CFG" : paramName : paramStrs
 
-        answerFullConfig cl pr = map (toAnswer cl) $
-                 ("FULLMAPCONFIG", concatMap ((Map.!) pr) ["MAP", "MAPGEN", "SEED"])
+        answerFullConfig cl mpr pr = map (toAnswer cl) $
+                 ("FULLMAPCONFIG", Map.elems mpr)
                  : ("SCHEME", pr Map.! "SCHEME")
-                 : (filter (\(p, _) -> p /= "SCHEME" && p /= "MAP" && p /= "MAPGEN" && p /= "SEED") $ Map.toList pr)
+                 : (filter (\(p, _) -> p /= "SCHEME") $ Map.toList pr)
 
         answerTeams cl jRoom = let f = if gameinprogress jRoom then teamsAtStart else teams in answerAllTeams cl $ f jRoom