share/hedgewars/Data/Scripts/Multiplayer/Racer.lua
changeset 10856 d080b8d4c114
parent 10847 b68e35d6e376
child 11542 64a5ab2c4f00
child 12366 744e51920a04
equal deleted inserted replaced
10855:1af1a54d740b 10856:d080b8d4c114
    77 -- SCRIPT BEGINS
    77 -- SCRIPT BEGINS
    78 -----------------------------
    78 -----------------------------
    79 
    79 
    80 HedgewarsScriptLoad("/Scripts/Locale.lua")
    80 HedgewarsScriptLoad("/Scripts/Locale.lua")
    81 HedgewarsScriptLoad("/Scripts/OfficialChallenges.lua")
    81 HedgewarsScriptLoad("/Scripts/OfficialChallenges.lua")
       
    82 HedgewarsScriptLoad("/Scripts/Params.lua")
    82 
    83 
    83 ------------------
    84 ------------------
    84 -- Got Variables?
    85 -- Got Variables?
    85 ------------------
    86 ------------------
    86 
    87 
   100 local currCount = 0
   101 local currCount = 0
   101 
   102 
   102 local specialPointsX = {}
   103 local specialPointsX = {}
   103 local specialPointsY = {}
   104 local specialPointsY = {}
   104 local specialPointsCount = 0
   105 local specialPointsCount = 0
       
   106 
       
   107 local TeamRope = false
   105 
   108 
   106 --------------------------
   109 --------------------------
   107 -- hog and team tracking variales
   110 -- hog and team tracking variales
   108 --------------------------
   111 --------------------------
   109 
   112 
   149 local RoundHasChanged
   152 local RoundHasChanged
   150 
   153 
   151 -------------------
   154 -------------------
   152 -- general methods
   155 -- general methods
   153 -------------------
   156 -------------------
       
   157 
       
   158 function onParameters()
       
   159     parseParams()
       
   160     if params["teamrope"] ~= nil then
       
   161         TeamRope = true
       
   162     end
       
   163 end
   154 
   164 
   155 function RebuildTeamInfo()
   165 function RebuildTeamInfo()
   156 
   166 
   157 
   167 
   158         -- make a list of individual team names
   168         -- make a list of individual team names
   711 
   721 
   712         if GetGearType(gear) == gtHedgehog then
   722         if GetGearType(gear) == gtHedgehog then
   713                 hhs[numhhs] = gear
   723                 hhs[numhhs] = gear
   714                 numhhs = numhhs + 1
   724                 numhhs = numhhs + 1
   715                 SetEffect(gear, heResurrectable, 1)
   725                 SetEffect(gear, heResurrectable, 1)
   716         end
   726         elseif GetGearType(gear) == gtAirAttack then
   717 
       
   718         if GetGearType(gear) == gtAirAttack then
       
   719                 cGear = gear
   727                 cGear = gear
   720         end
   728         elseif GetGearType(gear) == gtRope and TeamRope then
   721 
   729             SetTag(gear,1)
       
   730             SetGearValues(gear,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,GetClanColor(GetHogClan(CurrentHedgehog)))
       
   731         elseif GetGearType(gear) == gtAirMine then
       
   732             DeleteGear(gear)
       
   733         end
   722 end
   734 end
   723 
   735 
   724 function onGearDelete(gear)
   736 function onGearDelete(gear)
   725 
   737 
   726         if GetGearType(gear) == gtAirAttack then
   738         if GetGearType(gear) == gtAirAttack then