The online racing simulator
Lap number in MCI packet increases too early
hello,

I wonder about the lap number in the MCI packet. I have observed that the lap number increases very often shortly before the car crossed the node of the finish line. I.e. in blackwood the node of the finish line is node 431, but I found the lap number already increased when the car is still in node 427, 428 or something else lower than 431. I have attached a log file with items every time a car crossed s/f detected by a change of the lap number in the MCI packet.

This is an issue for me, because I would need to track the lap number myself instead of just reading it out of the MCI packet. Are there solutions? Or am I just wrong?

Regards
Soeren
Attached files
laplog.txt - 9.5 KB - 169 views
Assumeing that your getting the race from the start, just on a lap packet ++ the lap ammout for that car.
Quote from Dygear :Assumeing that your getting the race from the start, ....

this is a very limiting assumption, isn't it?
Well, it is not really a big problem to handle (see below code snippet). But what I am actually wondering about is, if it is intentionally, otherwise it would have been declared as a bug.

the way I would handle this:

m_nodeVar = pMCI->Node_Lap_Hi3 & 0x1fff;
if ((m_nodeVar < (m_FinishNode - 10)) || (m_nodeVar > m_FinishNode))
{
m_LapVar = pMCI->Lap_Lo8 | ((pMCI->Node_Lap_Hi3 & 0xe000) >> 5);
}
else
{
/* leave m_LapVar untouched, */
}

I have made some tests. It seems that this issue does apply to multiplayer only. I have tested with singelplayer replays and there the lap number always increased after the car crossed the node of the finish line. Maybe it is an latency or lag related issue?

FGED GREDG RDFGDR GSFDG