09.09.2013, 07:32
Your race place method should work fine but if your calling it every second there is a much better way to do it and get more information at the same time.
1.) Get all the players distances from the end of the race
2.) Quick sort the list
I think this is a better way since now you don't have to loop through all players for every player. But you wouldn't even notice with 10 players with a 100 players however it would be a better option another good thing is you also have the players progression and amount left to complete the race.
1.) Get all the players distances from the end of the race
2.) Quick sort the list
I think this is a better way since now you don't have to loop through all players for every player. But you wouldn't even notice with 10 players with a 100 players however it would be a better option another good thing is you also have the players progression and amount left to complete the race.