Found another possible source of desync, trying similar workaround on this
authorunc0rr
Thu, 21 Feb 2013 01:26:38 +0400
changeset 8525 81630d47dc0f
parent 8523 f13ae07d82d7
child 8527 bf671ddf467c
Found another possible source of desync, trying similar workaround on this
gameServer/HWProtoInRoomState.hs
--- a/gameServer/HWProtoInRoomState.hs	Thu Feb 21 00:15:11 2013 +0400
+++ b/gameServer/HWProtoInRoomState.hs	Thu Feb 21 01:26:38 2013 +0400
@@ -77,9 +77,11 @@
                 SendUpdateOnThisRoom,
                 ModifyClient (\c -> c{teamsInGame = teamsInGame c + 1, clientClan = Just teamColor}),
                 AnswerClients clChan ["TEAM_ACCEPTED", tName],
-                AnswerClients clChan ["HH_NUM", tName, showB $ hhnum newTeam],
                 AnswerClients othChans $ teamToNet $ newTeam,
-                AnswerClients roomChans ["TEAM_COLOR", tName, teamColor]
+                AnswerClients roomChans ["TEAM_COLOR", tName, teamColor],
+                ModifyClient $ \c -> c{actionsPending = actionsPending cl
+                    ++ AnswerClients clChan ["HH_NUM", tName, showB $ hhnum newTeam]},
+                AnswerClients [sendChan cl] ["PING"]
                 ]
         where
         canAddNumber rt = (48::Int) - (sum $ map hhnum rt)