Send MAP config param last
authorunc0rr
Sun, 08 Mar 2009 16:47:22 +0000
changeset 1871 ce5854fbc631
parent 1870 72af1c414345
child 1872 abfce825a14f
Send MAP config param last
gameServer/HWProtoLobbyState.hs
--- a/gameServer/HWProtoLobbyState.hs	Sun Mar 08 16:01:06 2009 +0000
+++ b/gameServer/HWProtoLobbyState.hs	Sun Mar 08 16:47:22 2009 +0000
@@ -71,7 +71,7 @@
 		++ answerNicks
 		++ answerReady
 		++ [AnswerThisRoom ["NOT_READY", nick client]]
-		++ answerFullConfig jRoom
+		++ answerFullConfig
 		++ answerTeams
 		++ watchRound
 	where
@@ -90,7 +90,9 @@
 			map (\clID -> clients IntMap.! clID) roomClientsIDs
 
 		toAnswer (paramName, paramStrs) = AnswerThisClient $ "CFG" : paramName : paramStrs
-		answerFullConfig room = map toAnswer (Map.toList $ params room)
+		
+		answerFullConfig = map toAnswer (leftConfigPart ++ rightConfigPart)
+		(leftConfigPart, rightConfigPart) = partition (\(p, _) -> p /= "MAP") (Map.toList $ params jRoom)
 
 		watchRound = if not $ gameinprogress jRoom then
 					[]