changeset 15415 | 8504fee3b601 |
parent 15409 | 0e3bf53dfe47 |
child 15416 | 2cde69c1c680 |
15414:330a2d7d520d | 15415:8504fee3b601 |
---|---|
872 |
872 |
873 function onGameTick20() |
873 function onGameTick20() |
874 |
874 |
875 -- airstrike detected, convert this into a potential waypoint spot |
875 -- airstrike detected, convert this into a potential waypoint spot |
876 if cGear ~= nil then |
876 if cGear ~= nil then |
877 x,y = GetGearPosition(cGear) |
877 local x,y = GetGearPosition(cGear) |
878 if x > -9000 then |
878 if x > -9000 then |
879 x,y = GetGearTarget(cGear) |
879 local x,y = GetGearTarget(cGear) |
880 |
880 |
881 |
881 |
882 if TestRectForObstacle(x-20, y-20, x+20, y+20, true) then |
882 if TestRectForObstacle(x-20, y-20, x+20, y+20, true) then |
883 AddCaption(loc("Please place the waypoint in the air, within the map boundaries")) |
883 AddCaption(loc("Please place the waypoint in the air, within the map boundaries")) |
884 PlaySound(sndDenied) |
884 PlaySound(sndDenied) |
893 end |
893 end |
894 end |
894 end |
895 else |
895 else |
896 DeleteGear(cGear) |
896 DeleteGear(cGear) |
897 end |
897 end |
898 SetGearPosition(cGear, -10000, 0) |
898 SetGearPosition(cGear, -10000, y) |
899 end |
899 end |
900 |
900 |
901 |
901 |
902 -- start the player tumbling with a boom once their turn has actually begun |
902 -- start the player tumbling with a boom once their turn has actually begun |
903 if racerActive == false then |
903 if racerActive == false then |
1019 hhs[numhhs] = gear |
1019 hhs[numhhs] = gear |
1020 numhhs = numhhs + 1 |
1020 numhhs = numhhs + 1 |
1021 SetEffect(gear, heResurrectable, 1) |
1021 SetEffect(gear, heResurrectable, 1) |
1022 elseif GetGearType(gear) == gtAirAttack then |
1022 elseif GetGearType(gear) == gtAirAttack then |
1023 cGear = gear |
1023 cGear = gear |
1024 local x,y = GetGearPosition(cGear) |
|
1025 SetGearPosition(cGear, 10000, y) |
|
1026 elseif (not gameBegun) and GetGearType(gear) == gtAirBomb then |
|
1027 DeleteGear(gear) |
|
1024 elseif GetGearType(gear) == gtRope and TeamRope then |
1028 elseif GetGearType(gear) == gtRope and TeamRope then |
1025 SetTag(gear,1) |
1029 SetTag(gear,1) |
1026 SetGearValues(gear,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,GetClanColor(GetHogClan(CurrentHedgehog))) |
1030 SetGearValues(gear,nil,nil,nil,nil,nil,nil,nil,nil,nil,nil,GetClanColor(GetHogClan(CurrentHedgehog))) |
1027 end |
1031 end |
1028 end |
1032 end |