Fix replay sanity check
authorunc0rr
Sun, 08 Nov 2015 12:06:13 +0300
changeset 11321 71a46315c2d4
parent 11320 556eafd1443a
child 11322 c32b5d5181dd
Fix replay sanity check
gameServer/EngineInteraction.hs
--- a/gameServer/EngineInteraction.hs	Sat Nov 07 23:44:49 2015 +0300
+++ b/gameServer/EngineInteraction.hs	Sun Nov 08 12:06:13 2015 +0300
@@ -125,7 +125,8 @@
         sane = Set.null (keys1 Set.\\ Map.keysSet mParams)
             && Set.null (keys2 Set.\\ Map.keysSet prms)
             && (not . null . drop 41 $ scheme)
-            && (not . null . drop 8 $ prms Map.! "AMMO")
+            && (not . null . tail $ prms Map.! "AMMO")
+            && ((B.length . head $ 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"]]