# HG changeset patch # User unc0rr # Date 1420535554 -10800 # Node ID 18afcfaa4d5ac65be326f2b5bc674c9e0418f92b # Parent 56e401fb45eab6436bef9a5094fceed4bb6da666 - Send maze_size command in other mapgen modes too - Fix drawn land mapgen detection diff -r 56e401fb45ea -r 18afcfaa4d5a gameServer/EngineInteraction.hs --- a/gameServer/EngineInteraction.hs Mon Jan 05 16:29:27 2015 +0100 +++ b/gameServer/EngineInteraction.hs Tue Jan 06 12:12:34 2015 +0300 @@ -124,10 +124,10 @@ maybeMap = let m = mParams Map.! "MAP" in if m `elem` mapGenTypes then [] else [eml ["emap ", m]] scheme = tail $ prms Map.! "SCHEME" mapgen = mParams Map.! "MAPGEN" + templateFilterMsg = eml ["e$maze_size ", mParams Map.! "MAZE_SIZE"] mapgenSpecific = case mapgen of - "1" -> [eml ["e$maze_size ", mParams Map.! "MAZE_SIZE"]] - "2" -> let d = head . fromMaybe [""] $ Map.lookup "DRAWNMAP" prms in if BW.length d <= 4 then [] else drawnMapData d - _ -> [] + "3" -> let d = head . fromMaybe [""] $ Map.lookup "DRAWNMAP" prms in if BW.length d <= 4 then [] else drawnMapData d + _ -> [templateFilterMsg] gameFlags :: Word32 gameFlags = foldl (\r (b, f) -> if b == "false" then r else r .|. f) 0 $ zip scheme gameFlagConsts schemeFlags = map (\(v, (n, m)) -> eml [n, " ", showB $ (readInt_ v) * m])