Better detection
authorunc0rr
Thu, 20 Mar 2014 22:14:30 +0400
changeset 10211 f4c51ab8f46d
parent 10209 76316652ef26
child 10212 5fb3bb2de9d2
Better detection
share/hedgewars/Data/Scripts/OfficialChallenges.lua
--- a/share/hedgewars/Data/Scripts/OfficialChallenges.lua	Thu Mar 20 17:14:25 2014 +0400
+++ b/share/hedgewars/Data/Scripts/OfficialChallenges.lua	Thu Mar 20 22:14:30 2014 +0400
@@ -1,11 +1,15 @@
 function detectMap()
     if RopePercent == 100 and MinesNum == 0 then
-        if LandDigest == "M838018718Scripts/Multiplayer/Racer.lua" then
-            return("Racer Challenge #1")
-        elseif LandDigest == "M-490229244Scripts/Multiplayer/Racer.lua" then
-            return("Racer Challenge #2")
-        elseif LandDigest == "M806689586Scripts/Multiplayer/Racer.lua" then
-            return("Racer Challenge #3")
+-- challenges with border
+        if GetGameFlag(gfBorder) then
+            if LandDigest == "M838018718Scripts/Multiplayer/Racer.lua" then
+                return("Racer Challenge #1")
+            elseif LandDigest == "M-490229244Scripts/Multiplayer/Racer.lua" then
+                return("Racer Challenge #2")
+            elseif LandDigest == "M806689586Scripts/Multiplayer/Racer.lua" then
+                return("Racer Challenge #3")
+        end
+-- challenges without border
         elseif LandDigest == "M-134869715Scripts/Multiplayer/Racer.lua" then
             return("Racer Challenge #4")
         end