Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
last lap time appears middle of first lap
04-06-2007, 02:55 AM,
#1
last lap time appears middle of first lap
I've noticed that on some (not sure if all) tracks the last lap field in the timer (but not the best lap) is suddenly filled in out of the blue. I'm using the development version of course...
Reply
04-10-2007, 12:56 AM,
#2
 
Has anyone else noticed this?
Reply
04-11-2007, 07:06 AM,
#3
 
I noticed this also. Haven't look at the code, but I think(or rather guess) this happens when the player car cross timing sector 1.
Reply
04-11-2007, 11:12 AM,
#4
 
Fixed in r1687.
Reply
04-12-2007, 05:02 PM,
#5
 
Yes it seems that way, thanks for the fix. Did you figure out what caused this to change? I know it was working properly before. Will track reversal be affected by your fix? I'll do some testing later on.
Reply
04-12-2007, 11:18 PM,
#6
 
I'm not sure when it was introduced. Anyway below is a long-winded explanation of the bug. Smile


In the track record file, there is a section for last lap time with the car name, lap sequence 0 and lap sequence 1 time.

The logic of displaying the last lap time is to compare the track record last lap car name against the current car name, if the name differ, display '--:--:--', otherwise, display the value stored in lap sequence 0.

If you select a car which is different from the track record last lap car, '--:--:--' will be displayed at the beginning of race, which is correct. However, when you reach lap sequence 1, TIMER::Lap() will be called. This function will update the car name and lap sequence 1 time. But it does not update the lap sequence 0 time.

After this, when the last lap time display function compares the car name, since they are the same, it will treat the lap sequence 0 time as the last lap time and display in the timer box. This is why it suddenly appears when you reach lap sequence 1.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)