equal
deleted
inserted
replaced
31 |
31 |
32 -- hog with worst time (per round) |
32 -- hog with worst time (per round) |
33 local worsthog = nil |
33 local worsthog = nil |
34 |
34 |
35 local besthog = nil |
35 local besthog = nil |
|
36 local besthogname = '' |
36 |
37 |
37 -- best time |
38 -- best time |
38 local besttime = maxtime + 1 |
39 local besttime = maxtime + 1 |
39 |
40 |
40 -- best time per team |
41 -- best time per team |
140 bestTimes[teamname] = ttime |
141 bestTimes[teamname] = ttime |
141 end |
142 end |
142 if ttime < besttime then |
143 if ttime < besttime then |
143 besttime = ttime |
144 besttime = ttime |
144 besthog = CurrentHedgehog |
145 besthog = CurrentHedgehog |
|
146 besthogname = GetHogName(besthog) |
145 hscore = hscore .. loc("NEW fastest lap: ") |
147 hscore = hscore .. loc("NEW fastest lap: ") |
146 else |
148 else |
147 hscore = hscore .. loc("Fastest lap: ") |
149 hscore = hscore .. loc("Fastest lap: ") |
148 end |
150 end |
149 if ttime > worsttime then |
151 if ttime > worsttime then |
150 worsttime = ttime |
152 worsttime = ttime |
151 worsthog = CurrentHedgehog |
153 worsthog = CurrentHedgehog |
152 end |
154 end |
153 hscore = hscore .. GetHogName(besthog) .. " - " .. (besttime / 1000) .. " s | |" .. loc("Best laps per team: ") |
155 hscore = hscore .. besthogname .. " - " .. (besttime / 1000) .. " s | |" .. loc("Best laps per team: ") |
154 |
156 |
155 if clan == ClansCount -1 then |
157 if clan == ClansCount -1 then |
156 -- Time for elimination - worst hog is out and the worst hog vars are reset. |
158 -- Time for elimination - worst hog is out and the worst hog vars are reset. |
157 if worsthog ~= nil then |
159 if worsthog ~= nil then |
158 SetHealth(worsthog, 0) |
160 SetHealth(worsthog, 0) |