31-01-2007, 04:05 PM
Alright, my last suggestion, was to just use TotalOnlinePlayers for the count... the problem however, was that TotalOnlinePlayers only keeps the number... not the index (socket) number of the player. So let's say you had 5 people playing... and playes 2-4 quit. TotalOnlinePlayers would = 2, but TotalOnlinePlayer #2, would have to be shown as Index 5, but would be returned as 2. My suggestion, would be to go through, and while calculating TotalOnlinePlayers, if the player is "added" to the totalonlineplayer count... add the Number that they're being added in as (in this case 2), and then store their index in along with it. E.g., OnlinePlayer(2).Index = 5. Then just snag that back out of it later on when you use the TotalOnlinePlayers Loop. This could be a pretty substantial optimization... but i'm sure that there is again something that i've probably over looked. If you can think of a problem with this method please let me know. I'm going to add this to a blank MSE2 today, and if it works like it is supposed to, i'll go ahead and submit it to William as an optimization update for MSE2