--- a/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Mon May 28 20:04:49 2012 +0400
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Racer.lua Mon May 28 12:21:54 2012 -0400
@@ -107,7 +107,6 @@
--------
local cGear = nil
-local gTimer = 0
local bestClan = nil
local bestTime = nil
@@ -116,7 +115,6 @@
local gameOver = false
local racerActive = false
local trackTime = 0
-local wpCheckCounter = 0
local wpCirc = {}
local wpX = {}
@@ -552,7 +550,7 @@
end
-function onGameTick()
+function onGameTick20()
-- airstrike detected, convert this into a potential waypoint spot
if cGear ~= nil then
@@ -613,18 +611,14 @@
if (racerActive == true) and (gameBegun == true) then
--ghost
- gTimer = gTimer + 1
- if gTimer == 40 then
- gTimer = 0
+ if GameTime%40 == 0 then
HandleGhost()
end
- trackTime = trackTime + 1
+ trackTime = trackTime + 20
- wpCheckCounter = wpCheckCounter + 1
- if (wpCheckCounter == 100) then
+ if GameTime%100 == 0 then
- wpCheckCounter = 0
AddCaption(trackTime/1000,GetClanColor(GetHogClan(CurrentHedgehog)),capgrpMessage2)
if (CheckWaypoints() == true) then
@@ -640,7 +634,7 @@
-- if the player has expended his tunbling time, stop him tumbling
- if TurnTimeLeft <= 1 then
+ if TurnTimeLeft <= 20 then
DisableTumbler()
end