gameServer/OfficialServer/GameReplayStore.hs
changeset 5996 2c72fe81dd37
parent 5143 649d87819682
child 6040 a740069c21e3
--- a/gameServer/OfficialServer/GameReplayStore.hs	Fri Sep 23 09:58:41 2011 +0200
+++ b/gameServer/OfficialServer/GameReplayStore.hs	Sat Sep 24 00:00:57 2011 +0400
@@ -7,12 +7,14 @@
 import qualified Data.Map as Map
 import Data.Sequence()
 import System.Log.Logger
+import Data.Maybe
 
 saveReplay :: RoomInfo -> IO ()
 saveReplay r = do
     time <- getCurrentTime
     let fileName = "replays/" ++ show time
-    let replayInfo = (teamsAtStart r, Map.toList $ mapParams r, Map.toList $ params r, roundMsgs r)
+    let gi = fromJust $ gameInfo r
+    let replayInfo = (teamsAtStart gi, Map.toList $ mapParams r, Map.toList $ params r, roundMsgs gi)
     E.catch
         (writeFile fileName (show replayInfo))
         (\(e :: IOException) -> warningM "REPLAYS" $ "Couldn't write to " ++ fileName ++ ": " ++ show e)