gameServer/HWProtoInRoomState.hs
changeset 9304 3f4c3fc146c2
parent 9035 e84d42a4311c
child 9454 ac1874d56057
equal deleted inserted replaced
9303:457efde100b5 9304:3f4c3fc146c2
   215     rm <- thisRoom
   215     rm <- thisRoom
   216     chans <- roomOthersChans
   216     chans <- roomOthersChans
   217 
   217 
   218     if teamsInGame cl > 0 && (isJust $ gameInfo rm) && (not $ B.null legalMsgs) then
   218     if teamsInGame cl > 0 && (isJust $ gameInfo rm) && (not $ B.null legalMsgs) then
   219         return $ AnswerClients chans ["EM", legalMsgs]
   219         return $ AnswerClients chans ["EM", legalMsgs]
   220             : [ModifyRoom (\r -> r{gameInfo = liftM (\g -> g{roundMsgs = nonEmptyMsgs : roundMsgs g}) $ gameInfo r}) | not $ B.null nonEmptyMsgs]
   220             : [ModifyRoom (\r -> r{gameInfo = liftM 
       
   221                 (\g -> g{
       
   222                     roundMsgs = if B.null nonEmptyMsgs then roundMsgs g else nonEmptyMsgs : roundMsgs g
       
   223                     , lastFilteredTimedMsg = fromMaybe (lastFilteredTimedMsg g) lastFTMsg})
       
   224                 $ gameInfo r})]
   221         else
   225         else
   222         return []
   226         return []
   223     where
   227     where
   224         (legalMsgs, nonEmptyMsgs) = checkNetCmd msg
   228         (legalMsgs, nonEmptyMsgs, lastFTMsg) = checkNetCmd msg
   225 
   229 
   226 
   230 
   227 handleCmd_inRoom ["ROUNDFINISHED", _] = do
   231 handleCmd_inRoom ["ROUNDFINISHED", _] = do
   228     cl <- thisClient
   232     cl <- thisClient
   229     rm <- thisRoom
   233     rm <- thisRoom