share/hedgewars/Data/Scripts/Multiplayer/Racer.lua
changeset 15424 e347c3508f95
parent 15423 1028f5606b5f
child 15425 0e3bf53dfe47
equal deleted inserted replaced
15423:1028f5606b5f 15424:e347c3508f95
    60 local waypointCursor = false
    60 local waypointCursor = false
    61 local waypointPreview = nil
    61 local waypointPreview = nil
    62 
    62 
    63 local officialChallenge
    63 local officialChallenge
    64 
    64 
    65 local ammoDelays = {}
    65 local ammoDelays
    66 
    66 
    67 --------------------------
    67 --------------------------
    68 -- hog and team tracking variales
    68 -- hog and team tracking variales
    69 --------------------------
    69 --------------------------
    70 
    70 
   614         DisableGameFlags(gfKing, gfSwitchHog, gfAISurvival, gfPlaceHog, gfTagTeam)
   614         DisableGameFlags(gfKing, gfSwitchHog, gfAISurvival, gfPlaceHog, gfTagTeam)
   615         CaseFreq = 0
   615         CaseFreq = 0
   616         TurnTime = 90000
   616         TurnTime = 90000
   617         WaterRise = 0
   617         WaterRise = 0
   618         HealthDecrease = 0
   618         HealthDecrease = 0
   619 
       
   620 	-- Remember ammo delays for later
       
   621         for a=0, AmmoTypeMax do
       
   622                 local _, _, delay = GetAmmo(a)
       
   623                 ammoDelays[a] = delay
       
   624         end
       
   625 end
   619 end
   626 
   620 
   627 function InstructionsBuild()
   621 function InstructionsBuild()
   628         ShowMission(
   622         ShowMission(
   629                 loc("Racer"),
   623                 loc("Racer"),
   778         currCount = 0 -- hopefully this solves problem
   772         currCount = 0 -- hopefully this solves problem
   779         fastIndex = 0
   773         fastIndex = 0
   780         AddAmmo(CurrentHedgehog, amAirAttack, 0)
   774         AddAmmo(CurrentHedgehog, amAirAttack, 0)
   781         gTimer = 0
   775         gTimer = 0
   782 
   776 
       
   777         -- Remember ammo delays for later
       
   778         if ammoDelays == nil then
       
   779                 ammoDelays = {}
       
   780                 for a=0, AmmoTypeMax do
       
   781                 local _, _, delay = GetAmmo(a)
       
   782                         ammoDelays[a] = delay
       
   783                 end
       
   784         end
       
   785 
   783         -- Handle Starting Stage of Game
   786         -- Handle Starting Stage of Game
   784         if (gameOver == false) and (gameBegun == false) then
   787         if (gameOver == false) and (gameBegun == false) then
   785                 if wpCount >= 2 then
   788                 if wpCount >= 2 then
   786                         gameBegun = true
   789                         gameBegun = true
   787                         roundNumber = 0
   790                         roundNumber = 0