Don't change hedgehogs total number to a value > 48 as result of voting.
authorunc0rr
Tue, 31 Mar 2015 22:37:04 +0300
changeset 10879 9bedbd36de49
parent 10878 963bc20f511c
child 10880 bf64f1bef1cc
Don't change hedgehogs total number to a value > 48 as result of voting.
gameServer/Votes.hs
--- a/gameServer/Votes.hs	Tue Mar 31 03:41:36 2015 +0200
+++ b/gameServer/Votes.hs	Tue Mar 31 22:37:04 2015 +0300
@@ -117,10 +117,11 @@
         let answers = concatMap (\t -> 
                 [ModifyRoom $ modifyTeam t{hhnum = h}
                 , AnswerClients chans ["HH_NUM", teamname t, showB h]]
-                )
-                $
+                ) $ if length curteams * h > 48 then [] else curteams
+            ;
+            curteams =
                 if isJust $ gameInfo rm then
-                    teamsAtStart . fromJust . gameInfo $ rm 
+                    teamsAtStart . fromJust . gameInfo $ rm
                 else
                     teams rm