Sorry if this have been asked/handled already...
Does anybody have a 100% sure way to detect that everybody in the race has finished? I mean those who are going to get a place in finishing table.
This is bit tricky I guess. You cannot compare players in race and finished in IS_STA, because the player count is the number currently on track. If a player who has finished spectates, the player count is reduced by 1, and it is increased by 1 if a new joins. That is not related to if racing is in progress or not (finished) or if the added/removed player is such that he could have finished.
If there is no such way, maybe it should be added? Maybe a new packet telling that the last player who can get a place in finishing table (has started before the 1st player finishes the race) has finished. Adding a count (etc) to IS_FIN packet (telling number of racers) doesn't help because somebody could spectate/pit before the end and never finishing. Same problem with a new confirmation flag (e.g. CONF_LAST_PLAYER) for IS_RES.
This could be used for qualifying too (time ended and nobody can improve time anymore).
This would be nice as I wanted my program to do something immediately and only after everybody has finished.
Does anybody have a 100% sure way to detect that everybody in the race has finished? I mean those who are going to get a place in finishing table.
This is bit tricky I guess. You cannot compare players in race and finished in IS_STA, because the player count is the number currently on track. If a player who has finished spectates, the player count is reduced by 1, and it is increased by 1 if a new joins. That is not related to if racing is in progress or not (finished) or if the added/removed player is such that he could have finished.
If there is no such way, maybe it should be added? Maybe a new packet telling that the last player who can get a place in finishing table (has started before the 1st player finishes the race) has finished. Adding a count (etc) to IS_FIN packet (telling number of racers) doesn't help because somebody could spectate/pit before the end and never finishing. Same problem with a new confirmation flag (e.g. CONF_LAST_PLAYER) for IS_RES.
This could be used for qualifying too (time ended and nobody can improve time anymore).
This would be nice as I wanted my program to do something immediately and only after everybody has finished.