# HG changeset patch # User unc0rr # Date 1296069962 -10800 # Node ID cd4433b44920e57f56d53da871ee14f706c63c9a # Parent 39d07170085bd52659e7f6651b76bea67b4be533 Send spectators info diff -r 39d07170085b -r cd4433b44920 gameServer/HWProtoLobbyState.hs --- 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)] + {-