Raised This Month: $ Target: $400
 0% 

Question about grouping...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
capndurk
Senior Member
Join Date: Feb 2006
Old 04-07-2006 , 18:42  
Reply With Quote #1

on a side note, don't use Players[i] for every one of those; instead, do this:

Code:
new var = Players[i]; if((!is_user_bot(var)) && (!is_user_connecting(var)) && (cs_get_user_team(var) != CS_TEAM_SPECTATOR));

if you use Players[i], the logic of the program goes like this:
Code:
retrieve    i
retrieve    Players
retrieve    Players[i]
calculate   is_user_bot(Players[i])
retrieve    i
retrieve    Players
retrieve    Players[i]
calculate   is_user_connecting(Players[i])
retrieve    i
retrieve    Players
retrieve    Players[i]
calculate   cs_get_user_team(Players[i])
as opposed to:
Code:
retrieve    i
retrieve    Players
retrieve    Players[i]
store       var
retrieve    var
calculate   is_user_bot(var)
retrieve    var
calculate   is_user_connecting(var)
retrieve    var
calculate   cs_get_user_team(var)
it's just for increasing the speed of your program ;)
capndurk is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode