summaryrefslogtreecommitdiff
path: root/scripts/gugus/slipro.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gugus/slipro.lua')
-rw-r--r--scripts/gugus/slipro.lua42
1 files changed, 14 insertions, 28 deletions
diff --git a/scripts/gugus/slipro.lua b/scripts/gugus/slipro.lua
index 5c0ff18..3c06cf2 100644
--- a/scripts/gugus/slipro.lua
+++ b/scripts/gugus/slipro.lua
@@ -505,7 +505,7 @@ function rightDigitsEvent(swFunction)
lpt = lt - GetTimeInfo("sector1")
else
-- sector 3
- lpt = lt - GetTimeInfo("sector1") + GetTimeInfo("sector2")
+ lpt = lt - GetTimeInfo("sector1") - GetTimeInfo("sector2")
end
elseif swValue == 14 then
-- best sector 1
@@ -722,17 +722,17 @@ function rightDigitsEvent(swFunction)
return 1
elseif swValue == 37 then
- -- real time delta vs last + last sector diff 1, 2 and 3
+ -- real time delta vs last + sector splits
diffTimeFlag = true
- lpt = GetDeltaLastTime(false)
+ lpt = RealTimeDiff_SectorSplits(false, 42)
elseif swValue == 38 then
- -- real time delta vs best + last sector diff 1, 2 and 3
+ -- real time delta vs best + sector splits
diffTimeFlag = true
- lpt = GetDeltaBestTime(false)
+ lpt = RealTimeDiff_SectorSplits(true, true)
elseif swValue == 39 then
@@ -756,35 +756,21 @@ function rightDigitsEvent(swFunction)
lpt = GetTimeInfo("sector3")
elseif swValue == 44 then
- -- rfactor real time delta vs last + last sector diff 1, 2 and 3
+ -- real time delta vs best + best sector splits
diffTimeFlag = true
- lpt = GetDeltaLastTime(true)
+ lpt = RealTimeDiff_SectorSplits(true, false)
elseif swValue == 45 then
- -- rFactor real time delta vs best + last sector diff 1, 2 and 3
- diffTimeFlag = true
-
- lpt = GetDeltaBestTime(true)
-
- elseif swValue == 46 then
-- virtual best lap time
- bs1 = GetTimeInfo("bestsector1")
- ls1 = GetTimeInfo("lastsector1")
- if ls1 < bs1 then s1 = ls1 else s1 = bs1 end
-
- bs2 = GetTimeInfo("bestsector2")
- ls2 = GetTimeInfo("lastsector2")
- if ls2 < bs2 then s2 = ls2 else s2 = bs2 end
-
- bs3 = GetTimeInfo("bestsector3")
- ls3 = GetTimeInfo("lastsector3")
- if ls3 < bs3 then s3 = ls3 else s3 = bs3 end
-
- --print ( ls1 , " + " , ls2, " + ", ls3 )
- --print ( bs1 , " + " , bs2, " + ", bs3 )
- lpt = s1 + s2 + s3
+ lpt = 0.0
+ local Bs1 = mBestSectors[1]
+ local Bs2 = mBestSectors[2]
+ local Bs3 = mBestSectors[3]
+ if Bs3 ~= 0.0 and Bs2 ~= 0.0 and Bs1 ~= 0.0 then
+ lpt = Bs1 + Bs2 + Bs3
+ end
else
-- none