Unbreak server
authorunc0rr
Thu, 29 Aug 2013 12:01:19 +0400
changeset 9439 e0570f2e5f41
parent 9437 8d1e9a9dda8e
child 9442 fea1613ae91f
Unbreak server
gameServer/Actions.hs
--- a/gameServer/Actions.hs	Thu Aug 29 10:06:19 2013 +0400
+++ b/gameServer/Actions.hs	Thu Aug 29 12:01:19 2013 +0400
@@ -666,8 +666,10 @@
         filterM (client'sM rnc isReadyChecker) allci
 
     when (not $ null readyCheckersIds) $ do
-        modify (\s -> s{clientIndex = Just $ head readyCheckersIds})
-        processAction CheckRecord
+        oldci <- gets clientIndex
+        withStateT (\s -> s{clientIndex = Just $ head readyCheckersIds})
+            $ processAction CheckRecord
+        modify (\s -> s{clientIndex = oldci})
     where
         isReadyChecker cl = isChecker cl && isReady cl