19.01.2012, 11:56
Ok, let me put this out in pseudo code:
Код:
new racepos[MAX_PLAYERS]; Max player loop if (current player checkpoint > current idx checkpoint) && racepos player != 1 racepos playerid -- else if current player checkpoint < current idx checkpoint racepos playerid ++ else get pos of the active checkpoint get distance of player to checkpoint get distance of idx to checkpoint if (distance player < distance idx) && racepos player != 1 racepos player -- else racepos player ++