diff -r c7d73e5840c8 -r 7342f5020691 share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua Fri Feb 05 11:32:23 2016 +0300 +++ b/share/hedgewars/Data/Scripts/Multiplayer/TechRacer.lua Mon May 01 13:59:24 2017 +0300 @@ -173,7 +173,7 @@ local fastY = {} local fastCount = 0 local fastIndex = 0 -local fastColour +local fastColour = 0xffffffff local currX = {} local currY = {} @@ -246,7 +246,7 @@ teamNameArr[i] = " " -- = i teamSize[i] = 0 teamIndex[i] = 0 - teamScore[i] = 100000 + teamScore[i] = 1000000 end numTeams = 0 @@ -350,7 +350,7 @@ function AdjustScores() if bestTime == nil then - bestTime = 100000 + bestTime = 1000000 bestClan = 10 bestTimeComment = "N/A" end @@ -380,7 +380,7 @@ end end - if bestTime ~= 100000 then + if bestTime ~= 1000000 then bestTimeComment = (bestTime/1000) ..loc("s") end @@ -690,10 +690,11 @@ end function onGameInit() + if mapID == nil then + mapID = 2 + GetRandom(7) + end - if mapID == nil then - mapID = 2 + GetRandom(7) - end + addHashData(mapID) Theme = "Cave" @@ -724,10 +725,22 @@ end function onSpecialPoint(x,y,flag) - specialPointsX[specialPointsCount] = x - specialPointsY[specialPointsCount] = y - specialPointsFlag[specialPointsCount] = flag - specialPointsCount = specialPointsCount + 1 + if flag == 99 then + fastX[fastCount] = x + fastY[fastCount] = y + fastCount = fastCount + 1 + elseif flag == 0 then + techX[techCount], techY[techCount] = x, y + techCount = techCount + 1 + else + addHashData(x) + addHashData(y) + addHashData(flag) + specialPointsX[specialPointsCount] = x + specialPointsY[specialPointsCount] = y + specialPointsFlag[specialPointsCount] = flag + specialPointsCount = specialPointsCount + 1 + end end function InterpretPoints() @@ -1245,6 +1258,7 @@ function onAchievementsDeclaration() usedWeapons[amSkip] = nil + usedWeapons[amExtraTime] = nil usedRope = usedWeapons[amRope] ~= nil usedPortal = usedWeapons[amPortalGun] ~= nil @@ -1270,10 +1284,10 @@ raceType = "mixed race" end - map = detectMap() + map = detectMapWithDigest() for i = 0, (numTeams-1) do - if teamScore[i] < 100000 then + if teamScore[i] < 1000000 then DeclareAchievement(raceType, teamNameArr[i], map, teamScore[i]) end end