Try to prevent hedgehogs number in team desync
authorunc0rr
Thu, 21 Feb 2013 22:43:00 +0400
changeset 8541 0cd63b963330
parent 8539 49e657b77499
child 8543 b7f07363ee92
Try to prevent hedgehogs number in team desync
gameServer/EngineInteraction.hs
gameServer/HWProtoInRoomState.hs
--- a/gameServer/EngineInteraction.hs	Thu Feb 21 22:31:03 2013 +0400
+++ b/gameServer/EngineInteraction.hs	Thu Feb 21 22:43:00 2013 +0400
@@ -90,7 +90,7 @@
         initHealth = scheme !! 27
         teamSetup :: TeamInfo -> [B.ByteString]
         teamSetup t = (++) ammo $
-                eml ["eaddteam <hash> ", showB $ (1 + (readInt_ $ teamcolor t) :: Int) * 1234, " ", teamname t]
+                eml ["eaddteam <hash> ", showB $ (1 + (readInt_ $ teamcolor t) :: Int) * 2113696, " ", teamname t]
                 : em "erdriven"
                 : eml ["efort ", teamfort t]
                 : take (2 * hhnum t) (
--- a/gameServer/HWProtoInRoomState.hs	Thu Feb 21 22:31:03 2013 +0400
+++ b/gameServer/HWProtoInRoomState.hs	Thu Feb 21 22:43:00 2013 +0400
@@ -77,10 +77,11 @@
                 SendUpdateOnThisRoom,
                 ModifyClient (\c -> c{teamsInGame = teamsInGame c + 1, clientClan = Just teamColor}),
                 AnswerClients clChan ["TEAM_ACCEPTED", tName],
-                AnswerClients othChans $ teamToNet $ newTeam,
-                AnswerClients roomChans ["TEAM_COLOR", tName, teamColor],
                 ModifyClient $ \c -> c{actionsPending = actionsPending cl
-                    ++ [AnswerClients clChan ["HH_NUM", tName, showB $ hhnum newTeam]]},
+                    ++ [AnswerClients clChan ["HH_NUM", tName, showB $ hhnum newTeam]
+                        , AnswerClients othChans $ teamToNet $ newTeam
+                        , AnswerClients roomChans ["TEAM_COLOR", tName, teamColor]
+                    ]},
                 AnswerClients [sendChan cl] ["PING"]
                 ]
         where