merge
authorhwmirror
Mon, 09 Nov 2015 18:03:47 +0000
changeset 11340 dfcbc2639ade
parent 11337 41ca5f8ace18 (diff)
parent 11339 8ce376b16132 (current diff)
child 11341 e6e748d021d0
merge
--- a/gameServer/EngineInteraction.hs	Mon Nov 09 18:37:57 2015 +0100
+++ b/gameServer/EngineInteraction.hs	Mon Nov 09 18:03:47 2015 +0000
@@ -129,7 +129,7 @@
             && ((B.length . head . tail $ prms Map.! "AMMO") > 200)
         mapGenTypes = ["+rnd+", "+maze+", "+drawn+", "+perlin+"]
         scriptName = head . fromMaybe ["Normal"] $ Map.lookup "SCRIPT" prms
-        maybeScript = let s = scriptName in if s == "Normal" then [] else [eml ["escript Scripts/Multiplayer/", s, ".lua"]]
+        maybeScript = let s = scriptName in if s == "Normal" then [] else [eml ["escript Scripts/Multiplayer/", spaces2Underlining s, ".lua"]]
         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"
@@ -166,6 +166,7 @@
         infRopes = ammoStr `B.index` 7  == '9'
         vamp = gameFlags .&. 0x00000200 /= 0
         infattacks = gameFlags .&. 0x00100000 /= 0
+        spaces2Underlining = B.map (\c -> if c == ' ' then '_' else c)
 
 drawnMapData :: B.ByteString -> [B.ByteString]
 drawnMapData =