# HG changeset patch
# User unc0rr
# Date 1361472180 -14400
# Node ID 0cd63b96333000ff3eee71f5e78c7c5970608230
# Parent  49e657b77499f75974a6f856e9999a759b7ac192
Try to prevent hedgehogs number in team desync

diff -r 49e657b77499 -r 0cd63b963330 gameServer/EngineInteraction.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) (
diff -r 49e657b77499 -r 0cd63b963330 gameServer/HWProtoInRoomState.hs
--- 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