gameServer/HWProtoInRoomState.hs
branchqmlfrontend
changeset 11448 42a9dd7b724c
parent 11414 6f119783a1ad
child 11508 a4ad8a9e0f69
--- a/gameServer/HWProtoInRoomState.hs	Sun Dec 06 20:35:58 2015 +0300
+++ b/gameServer/HWProtoInRoomState.hs	Sun Dec 06 20:36:21 2015 +0300
@@ -175,11 +175,11 @@
                 ModifyClient
                     (\c -> c{
                         teamsInGame = teamsInGame c - 1,
-                        clientClan = if teamsInGame c == 1 then Nothing else Just $ anotherTeamClan clNick team r
+                        clientClan = if teamsInGame c == 1 then Nothing else anotherTeamClan clNick team r
                     })
                 ]
     where
-        anotherTeamClan clNick team = teamcolor . fromMaybe (error "CHECKPOINT 011") . find (\t -> (teamowner t == clNick) && (t /= team)) . teams
+        anotherTeamClan clNick team = liftM teamcolor . find (\t -> (teamowner t == clNick) && (t /= team)) . teams
         findTeam = find (\t -> tName == teamname t) . teams