Fix script
authorunc0rr
Mon, 24 Mar 2014 21:32:24 +0400
changeset 10214 426aafe1f3ed
parent 10213 e924d1935aa6
child 10215 26fc5502ba22
Fix script
share/hedgewars/Data/Scripts/OfficialChallenges.lua
--- a/share/hedgewars/Data/Scripts/OfficialChallenges.lua	Mon Mar 24 16:51:39 2014 +0400
+++ b/share/hedgewars/Data/Scripts/OfficialChallenges.lua	Mon Mar 24 21:32:24 2014 +0400
@@ -1,19 +1,19 @@
 function detectMap()
     if RopePercent == 100 and MinesNum == 0 then
 -- challenges with border
-        if GetGameFlag(gfBorder) then
+        if band(GameFlags, gfBorder) ~= 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")
-        end
+            end
 -- challenges without border
-        else if LandDigest == "M-134869715Scripts/Multiplayer/Racer.lua" then
-                return("Racer Challenge #4")
-            elseif LandDigest == "M-661895109Scripts/Multiplayer/Racer.lua" then
-                return("Racer Challenge #5")
+        elseif LandDigest == "M-134869715Scripts/Multiplayer/Racer.lua" then
+            return("Racer Challenge #4")
+        elseif LandDigest == "M-661895109Scripts/Multiplayer/Racer.lua" then
+            return("Racer Challenge #5")
         end
     end
 end