Remove CHECKPOINT 011 occurence, probably hiding some bug
authorunc0rr
Thu, 19 Nov 2015 13:30:34 +0300
changeset 11419 6f119783a1ad
parent 11417 c19f2387d24f
child 11453 42a9dd7b724c
child 11466 5dbc0f976b4a
child 11493 637fb0558a73
Remove CHECKPOINT 011 occurence, probably hiding some bug
gameServer/HWProtoInRoomState.hs
--- a/gameServer/HWProtoInRoomState.hs	Wed Nov 18 14:12:15 2015 -0500
+++ b/gameServer/HWProtoInRoomState.hs	Thu Nov 19 13:30:34 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