gameServer/HWProtoLobbyState.hs
changeset 4936 d65d438acd23
parent 4932 f11d80bac7ed
child 4941 90572c338e60
--- a/gameServer/HWProtoLobbyState.hs	Tue Feb 08 02:43:07 2011 +0100
+++ b/gameServer/HWProtoLobbyState.hs	Tue Feb 08 22:24:30 2011 +0300
@@ -42,7 +42,10 @@
                 nick $ irnc `client` masterID r,
                 head (Map.findWithDefault ["+gen+"] "MAP" (params r)),
                 head (Map.findWithDefault ["Default"] "SCHEME" (params r)),
-                head (Map.findWithDefault ["Default"] "AMMO" (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))
                 ]
 
 
@@ -102,9 +105,10 @@
 
         toAnswer cl (paramName, paramStrs) = AnswerClients [sendChan cl] $ "CFG" : paramName : paramStrs
 
-        answerFullConfig cl pr = map (toAnswer cl) (leftConfigPart ++ rightConfigPart)
-            where
-            (leftConfigPart, rightConfigPart) = partition (\(p, _) -> p /= "MAP") $ Map.toList pr
+        answerFullConfig cl pr = map (toAnswer cl) $
+                 ("FULLMAPCONFIG", concatMap ((Map.!) pr) ["MAP", "MAPGEN", "SEED"])
+                 : ("SCHEME", pr Map.! "SCHEME")
+                 : (filter (\(p, _) -> p /= "SCHEME" && p /= "MAP" && p /= "MAPGEN" && p /= "SEED") $ Map.toList pr)
 
         answerTeams cl jRoom = let f = if gameinprogress jRoom then teamsAtStart else teams in answerAllTeams cl $ f jRoom