gameServer/HWProtoInRoomState.hs
changeset 5931 184057074257
parent 5143 649d87819682
child 5996 2c72fe81dd37
--- a/gameServer/HWProtoInRoomState.hs	Fri Sep 16 10:29:09 2011 -0400
+++ b/gameServer/HWProtoInRoomState.hs	Fri Sep 16 19:55:11 2011 +0400
@@ -52,7 +52,7 @@
         clChan <- thisClientChans
         othChans <- roomOthersChans
         return $
-            if not . null . drop 5 $ teams rm then
+            if not . null . drop (maxTeams rm - 1) $ teams rm then
                 [Warning "too many teams"]
             else if canAddNumber rm <= 0 then
                 [Warning "too many hedgehogs"]
@@ -78,6 +78,10 @@
         hhsList [_] = error "Hedgehogs list with odd elements number"
         hhsList (n:h:hhs) = HedgehogInfo n h : hhsList hhs
         newTeamHHNum r = min 4 (canAddNumber r)
+        maxTeams r 
+            | roomProto r < 38 = 6
+            | otherwise = 8
+                
 
 handleCmd_inRoom ["REMOVE_TEAM", tName] = do
         (ci, _) <- ask