share/hedgewars/Data/Scripts/Multiplayer/Racer.lua
changeset 14070 a5be3ef4bbbe
parent 13841 b2cc4e4e380c
child 14252 bdc7ba72bbad
equal deleted inserted replaced
14069:abb42ba345b6 14070:a5be3ef4bbbe
   115 
   115 
   116 local TeamRope = false
   116 local TeamRope = false
   117 
   117 
   118 local waypointCursor = false
   118 local waypointCursor = false
   119 local waypointPreview = nil
   119 local waypointPreview = nil
       
   120 
       
   121 local officialChallenge
   120 
   122 
   121 --------------------------
   123 --------------------------
   122 -- hog and team tracking variales
   124 -- hog and team tracking variales
   123 --------------------------
   125 --------------------------
   124 
   126 
   708         SetSoundMask(sndMissed, true)
   710         SetSoundMask(sndMissed, true)
   709 
   711 
   710         roundN = 0
   712         roundN = 0
   711         lastRound = TotalRounds
   713         lastRound = TotalRounds
   712         RoundHasChanged = false
   714         RoundHasChanged = false
       
   715         officialChallenge = detectMapWithDigest()
   713 
   716 
   714 	if GetBackgroundBrightness() == 1 then
   717 	if GetBackgroundBrightness() == 1 then
   715 		-- Dark waypoint colour theme
   718 		-- Dark waypoint colour theme
   716 		waypointColour = waypointColourDark
   719 		waypointColour = waypointColourDark
   717 		waypointColourAtPlacement = waypointColourDarkAtPlacement
   720 		waypointColourAtPlacement = waypointColourDarkAtPlacement
  1092         raceType = "no tools race"
  1095         raceType = "no tools race"
  1093     else -- at least two of rope, portal and saucer used
  1096     else -- at least two of rope, portal and saucer used
  1094         raceType = "mixed race"
  1097         raceType = "mixed race"
  1095     end
  1098     end
  1096 
  1099 
  1097     map = detectMapWithDigest()
       
  1098 
       
  1099     for i = 0, (numTeams-1) do
  1100     for i = 0, (numTeams-1) do
  1100         if teamScore[i] < MAX_TURN_TIME then
  1101         if teamScore[i] < MAX_TURN_TIME then
  1101             DeclareAchievement(raceType, teamNameArr[i], map, teamScore[i])
  1102             DeclareAchievement(raceType, teamNameArr[i], officialChallenge, teamScore[i])
  1102         end
  1103         end
  1103     end
  1104     end
  1104 
  1105 
  1105     if map ~= nil and fastCount > 0 then
  1106     if officialChallenge ~= nil and fastCount > 0 then
  1106         StartGhostPoints(fastCount)
  1107         StartGhostPoints(fastCount)
  1107 
  1108 
  1108         for i = 0, (fastCount - 1) do
  1109         for i = 0, (fastCount - 1) do
  1109             DumpPoint(fastX[i], fastY[i])
  1110             DumpPoint(fastX[i], fastY[i])
  1110         end
  1111         end