diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2013-11-22 01:54:55 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2013-11-22 01:54:55 +0100 |
commit | 121d1785256c617e98726a29b0fd9c96e2c04c38 (patch) | |
tree | 1b708bd99dd2351fcb92a8c4bd7d64c25d06bd25 /scripts/gugus/dev.lua | |
parent | 0701f2c5c60ed4d448597654e43fe460ac8dd962 (diff) |
[gugus] *REAL* best sector times + some split sector times stuff.
Diffstat (limited to 'scripts/gugus/dev.lua')
-rw-r--r-- | scripts/gugus/dev.lua | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/scripts/gugus/dev.lua b/scripts/gugus/dev.lua index ba4061b..3e7360b 100644 --- a/scripts/gugus/dev.lua +++ b/scripts/gugus/dev.lua @@ -1,46 +1,14 @@ ---require("scripts/gugus/sector") - --- hint : i don’t care if this is correctly initialized at each session. -mCurrentSector = nil function custom_deviceReport(deviceType) -- sim paused? local paused = GetContextInfo("paused") - if !paused then - local sector = GetCarInfo("sector") - if mCurrentSector == nil or mCurrentSector ~= sector then - - local s1 = GetTimeInfo("sector1") - local s2 = GetTimeInfo("sector2") - local s3 = GetTimeInfo("sector3") - - local ls1 = GetTimeInfo("lastsector1") - local ls2 = GetTimeInfo("lastsector2") - local ls3 = GetTimeInfo("lastsector3") - - local bs1 = GetTimeInfo("bestsector1") - local bs2 = GetTimeInfo("bestsector2") - local bs3 = GetTimeInfo("bestsector3") - - print ("") - print ("--- lap "..GetContextInfo("laps").." ----------------------------------------") - print ("sector " ..mCurrentSector.." -> "..sector.." [curr] " .. s1 .. " - " .. s2 .. " - " .. s3) - print ("sector " ..mCurrentSector.." -> "..sector.." [last] " ..ls1 .. " - " ..ls2 .. " - " ..ls3) - print ("sector " ..mCurrentSector.." -> "..sector.." [best] " ..bs1 .. " - " ..bs2 .. " - " ..bs3) - print ("-----------------------------------------------------------------------------") - - --ls = GetTimeInfo(string.format("sector%d", mCurrentSector)) - --if mCurrentOptimalSectorTimes[sector] ~= 0.0 and mCurrentOptimalSectorTimes[sector] > ls then - -- mCurrentOptimalSectorTimes[sector] = ls - --end - - mCurrentSector = sector - end + if paused == false then + SectorUpdate() end return 2 end -print ("gugus> + sector") +print ("gugus> + dev") |