The online racing simulator
[SOLVED]Change posistion packet
Hi!
I'm making a system for long races with web stats.

I wonna ask: wchich packet is reporting about changing postition?
I mean when someone is taking other place (5th to 6th & 6th to 5th together)
There is no packet for this you have to find this out on your own.
@ CLRS530 : I beat with you you never codet some insim app...
out of this liveforstats...

@ Thread host:

Its in the MCI packed or in NLP to....
I think you know the other things how to read it out ect.

PS: If you wanna talk with me i can speak a lil bit German
I think the best is to make a new value in Player class like Players[i].last_pos and check on every MCI actual pos with saved. Am I right?
Yea right
#6 - amp88
Quote from misiek08 :I think the best is to make a new value in Player class like Players[i].last_pos and check on every MCI actual pos with saved. Am I right?

Yes. It also allows you to do other things like displaying the highest and lowest position the driver has been in during this race and showing their position at each split in the race or at the end of each lap in the race. You can also detect position changes (due to cars overtaking or due to a car spinning off) by comparing the position in the new MCI packet with the last position you stored for that player.
Quote from amp88 :comparing the position in the new MCI packet with the last position you stored for that player.

That I wrote in my last post (maybe my bad english mean something else).
Thank you all for reply.

Misiek
#8 - amp88
Quote from misiek08 :That I wrote in my last post (maybe my bad english mean something else).
Thank you all for reply.

Misiek

This is what I meant with the above explanation (pseudocode):

public void updatePosition (int newPosition) {
if(newPosition != position) {
// Position has changed since last MCI packet (this driver has overtaken someone or been overtaken by someone)
}

if(newPosition > worstPosition) {
// The player is in a worse position now than they have been in this race
worstPosition = newPosition
}

if(newPosition < bestPosition) {
// The player is in a better position than they have been in this race
bestPosition = newPosition
}

// Update the current position to the new position
position = newPosition
}


FGED GREDG RDFGDR GSFDG