Raised This Month: $ Target: $400
 0% 

get_players or global var


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 05-14-2015 , 11:49   Re: get_players or global var
Reply With Quote #1

I'm not aware of any issues with get_players in the latest AMXX builds, especially not the "a" or "b" flag. Your approach only complicates the code and will not result in a performance benefit. Quite the opposite actually: get_players will in almost all cases be the fastest method for looping players, as it does all filtering at once (not that it matters).

If you truly wanted to cache data like team and alive counts you would need a very good reason for it. A task that runs every 5 seconds is definitely not one of those reasons. AddToFullPack and similar are pretty much the only use-cases that might qualify.

Quote:
Originally Posted by aron9forever View Post
cancel while connecting
any type of client crash or connection loss (client_disconnect will eventually be called, but only after sv_timeout seconds)
The client is technically not disconnected until he times out. That's quite different to "client_disconnected is not called in certain cases". Please be careful with such claims.
__________________
In Flames we trust!

Last edited by Nextra; 05-14-2015 at 11:49.
Nextra is offline
Reply


Thread Tools
Display Modes

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 18:41.


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