gameServer/HWProtoLobbyState.hs
branchserver_refactor
changeset 4595 cd4433b44920
parent 4591 c91364bf6a69
child 4597 31e042ab870c
--- a/gameServer/HWProtoLobbyState.hs	Wed Jan 26 22:06:27 2011 +0300
+++ b/gameServer/HWProtoLobbyState.hs	Wed Jan 26 22:26:02 2011 +0300
@@ -93,6 +93,7 @@
             ++ (map (readynessMessage cl) jRoomClients)
             ++ (answerFullConfig cl $ params jRoom)
             ++ (answerTeams cl jRoom)
+            ++ (watchRound cl jRoom)
 
         where
         readynessMessage cl c = AnswerClients [sendChan cl] [if isReady c then "READY" else "NOT_READY", nick c]
@@ -105,6 +106,12 @@
 
         answerTeams cl jRoom = let f = if gameinprogress jRoom then teamsAtStart else teams in answerAllTeams cl $ f jRoom
 
+        watchRound cl jRoom = if not $ gameinprogress jRoom then
+                    []
+                else
+                    [AnswerClients [sendChan cl]  ["RUN_GAME"],
+                    AnswerClients [sendChan cl] $ "EM" : toEngineMsg "e$spectate 1" : Foldable.toList (roundMsgs jRoom)]
+
 
 
 {-