equal
deleted
inserted
replaced
657 #if defined(OFFICIAL_SERVER) |
657 #if defined(OFFICIAL_SERVER) |
658 processAction SaveReplay = do |
658 processAction SaveReplay = do |
659 ri <- clientRoomA |
659 ri <- clientRoomA |
660 rnc <- gets roomsClients |
660 rnc <- gets roomsClients |
661 |
661 |
662 allci <- io $ do |
662 readyCheckersIds <- io $ do |
663 r <- room'sM rnc id ri |
663 r <- room'sM rnc id ri |
664 saveReplay r |
664 saveReplay r |
665 allClientsM rnc |
665 allci <- allClientsM rnc |
666 |
666 filterM (client'sM rnc isReadyChecker) allci |
667 readyCheckersIds <- liftM (filter (client'sM isReadyChecker rnc)) allClientsS |
667 |
668 when (not $ null readyCheckersIds) $ do |
668 when (not $ null readyCheckersIds) $ do |
669 modify (\s -> s{clientIndex = Just $ head readyCheckersIds}) |
669 modify (\s -> s{clientIndex = Just $ head readyCheckersIds}) |
670 processAction CheckRecord |
670 processAction CheckRecord |
671 where |
671 where |
672 isReadyChecker cl = isChecker cl && isReady cl |
672 isReadyChecker cl = isChecker cl && isReady cl |