Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Is it possible to send player tag updates to select players
Re: Is it possible to send player tag updates to select players [message #474111 is a reply to message #474093] Sat, 08 September 2012 14:19 Go to previous messageGo to previous message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma:
General (4 Stars)
You should modify this for-loop from:

for (int i = 0;i < SpectatingPlayers.Count();i++)


To:

for (int i = 0, e = SpectatingPlayers.Count();i < e;i++)


The latter is more efficient, the ::Count() function gets called for every iteration of the loop. This is the reason why this is done in the clang compiler source code.

Also you should use GetTickCount64(), it's a more efficient (the engine uses GetTickCount() in a few places, but that one rolls around every 45 days or so, GetTickCount64() rolls around every 5 million years).


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SP Character Voices to Online
Next Topic: Feel like making something
Goto Forum:
  


Current Time: Sun Oct 06 02:17:15 MST 2024

Total time taken to generate the page: 0.01005 seconds