--- a/gameServer/CoreTypes.hs Fri Jan 25 12:59:06 2013 +0400
+++ b/gameServer/CoreTypes.hs Fri Jan 25 13:29:20 2013 +0400
@@ -38,7 +38,7 @@
isAdministrator :: Bool,
isChecker :: Bool,
isKickedFromServer :: Bool,
- clientClan :: !Maybe B.ByteString,
+ clientClan :: !(Maybe B.ByteString),
teamsInGame :: Word
}
--- 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