gameServer/HWProtoInRoomState.hs
branchspacecampaign
changeset 9308 4bddcc1a1450
parent 9304 3f4c3fc146c2
child 9454 ac1874d56057
--- a/gameServer/HWProtoInRoomState.hs	Mon Jul 01 22:28:42 2013 +0300
+++ b/gameServer/HWProtoInRoomState.hs	Mon Jul 01 23:23:22 2013 +0300
@@ -217,11 +217,15 @@
 
     if teamsInGame cl > 0 && (isJust $ gameInfo rm) && (not $ B.null legalMsgs) then
         return $ AnswerClients chans ["EM", legalMsgs]
-            : [ModifyRoom (\r -> r{gameInfo = liftM (\g -> g{roundMsgs = nonEmptyMsgs : roundMsgs g}) $ gameInfo r}) | not $ B.null nonEmptyMsgs]
+            : [ModifyRoom (\r -> r{gameInfo = liftM 
+                (\g -> g{
+                    roundMsgs = if B.null nonEmptyMsgs then roundMsgs g else nonEmptyMsgs : roundMsgs g
+                    , lastFilteredTimedMsg = fromMaybe (lastFilteredTimedMsg g) lastFTMsg})
+                $ gameInfo r})]
         else
         return []
     where
-        (legalMsgs, nonEmptyMsgs) = checkNetCmd msg
+        (legalMsgs, nonEmptyMsgs, lastFTMsg) = checkNetCmd msg
 
 
 handleCmd_inRoom ["ROUNDFINISHED", _] = do