gameServer/EngineInteraction.hs
changeset 11332 41ca5f8ace18
parent 11323 2400c9496288
child 11355 d3317d6162fe
--- a/gameServer/EngineInteraction.hs	Mon Nov 09 16:34:32 2015 +0000
+++ b/gameServer/EngineInteraction.hs	Mon Nov 09 20:51:18 2015 +0300
@@ -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 =