Hi!
I'm developing an InSim application which will be used in the hungarian league.
I have a question about these connection numbers and unique IDs.
1. As I understand unique IDs are used to identify racers who are not spectating, i.e. joined the race (they may be in the garage, though), and those who simply spectate do not have a Unique ID. The questions are: what if someone spectates and then rejoins the race? Will he get the same unique ID or is it undefined? If someone leaves the race, will the other unique IDs be affected in any way (I guess not)?
2. Connection IDs. Now, if I'm not misunderstanding something, the host has always the connection number 0, and others get the next integer number as they join (1,2,3...). If someone disconnects, then every connection number remains the same, except for the last connection (player with the biggest connection number), whose connection number will be changed to that of the disconnected player. Am I right? Question is - what if several players disconnect at the same time? Since LFS uses UDP packets, my InSim program may receive the packets in wrong order, so it may go out of sync (wrong updating of connection numbers). If that's the case, how can I make it work (to be in sync again)?
Thanks in advance
I'm developing an InSim application which will be used in the hungarian league.
I have a question about these connection numbers and unique IDs.
1. As I understand unique IDs are used to identify racers who are not spectating, i.e. joined the race (they may be in the garage, though), and those who simply spectate do not have a Unique ID. The questions are: what if someone spectates and then rejoins the race? Will he get the same unique ID or is it undefined? If someone leaves the race, will the other unique IDs be affected in any way (I guess not)?
2. Connection IDs. Now, if I'm not misunderstanding something, the host has always the connection number 0, and others get the next integer number as they join (1,2,3...). If someone disconnects, then every connection number remains the same, except for the last connection (player with the biggest connection number), whose connection number will be changed to that of the disconnected player. Am I right? Question is - what if several players disconnect at the same time? Since LFS uses UDP packets, my InSim program may receive the packets in wrong order, so it may go out of sync (wrong updating of connection numbers). If that's the case, how can I make it work (to be in sync again)?
Thanks in advance