--- a/gameServer/Actions.hs Mon Feb 02 23:12:56 2015 +0300
+++ b/gameServer/Actions.hs Sat Feb 07 23:26:14 2015 +0300
@@ -356,6 +356,9 @@
) joinedMidGame
) ri
+ rteams <- io $ room'sM rnc (L.nub . rejoinedTeams . fromJust . gameInfo) ri
+ mapM_ (processAction . RemoveTeam) rteams
+
mapM_ processAction $ (
SaveReplay
: ModifyRoom
@@ -425,6 +428,15 @@
mapM_ processAction removeTeamActions
+processAction SetRandomSeed = do
+ ri <- clientRoomA
+ thisRoomChans <- liftM (map sendChan) $ roomClientsS ri
+ seed <- liftM showB $ io $ (randomRIO (0, 10^9) :: IO Int)
+ mapM_ processAction [
+ ModifyRoom (\r -> r{mapParams = Map.insert "SEED" seed $ mapParams r})
+ , AnswerClients thisRoomChans ["CFG", "SEED", seed]
+ ]
+
processAction CheckRegistered = do
(Just ci) <- gets clientIndex