# HG changeset patch # User unc0rr # Date 1396033463 -14400 # Node ID 1d7112ccb3e9587c6769c2e6e3127c5c2ba3cdc0 # Parent 1a1da2342c5b51b1c756b35fb66b10ecf4b85852 Send updated info on map switched by voting diff -r 1a1da2342c5b -r 1d7112ccb3e9 gameServer/Votes.hs --- a/gameServer/Votes.hs Fri Mar 28 21:20:25 2014 +0400 +++ b/gameServer/Votes.hs Fri Mar 28 23:04:23 2014 +0400 @@ -68,7 +68,17 @@ let rs = Map.lookup roomSave (roomSaves rm) case rs of Nothing -> return [] - Just (mp, p) -> return [ModifyRoom $ \r -> r{params = p, mapParams = mp}] + Just (mp, p) -> do + cl <- thisClient + chans <- roomClientsChans + let a = map (replaceChans chans) $ answerFullConfigParams cl mp p + return $ + (ModifyRoom $ \r -> r{params = p, mapParams = mp}) + : SendUpdateOnThisRoom + : a + where + replaceChans chans (AnswerClients _ msg) = AnswerClients chans msg + replaceChans _ a = a startVote :: VoteType -> Reader (ClientIndex, IRnC) [Action]