gameServer/HWProtoInRoomState.hs
changeset 8433 3b318a130a62
parent 8431 74c2c95ab07b
child 8477 330b0b8846cf
--- a/gameServer/HWProtoInRoomState.hs	Fri Jan 25 12:59:06 2013 +0400
+++ b/gameServer/HWProtoInRoomState.hs	Fri Jan 25 13:29:20 2013 +0400
@@ -111,11 +111,11 @@
                 ModifyClient
                     (\c -> c{
                         teamsInGame = teamsInGame c - 1,
-                        clientClan = if teamsInGame c == 1 then Nothing else Just $ anotherTeamClan ci r
+                        clientClan = if teamsInGame c == 1 then Nothing else Just $ anotherTeamClan ci team r
                     })
                 ]
     where
-        anotherTeamClan ci = teamcolor . fromJust . find (\t -> (teamownerId t == ci) && (t /= team)) . teams
+        anotherTeamClan ci team = teamcolor . fromMaybe (error "CHECKPOINT 011") . find (\t -> (teamownerId t == ci) && (t /= team)) . teams
         findTeam = find (\t -> tName == teamname t) . teams