Quote:
Originally Posted by xines
|
(I'm not trying to pick on you personally. This is a general pet peeve.)
You've perfectly demonstrated some of the many issues with these "IsValidClient" stocks that people keep pasting around.
Many are different and all leave the client of "valid for what purpose?". There is no global marker making a client "valid" which is why separate functions exist. In this case, that stock above would potentially be skipping some connected clients, since they would only need to pass IsClientConnected for those linked natives, and not necessarily be fully in-game.
There are other cases where people stick and an "IsValidClient" stock and maybe it skips bots for example, but bots are valid and desired for the purpose. Or only alive, or non-spectator players are wanted, but aren't filtered out.
At most, you could condense to just having an IsClientIndex to return the first checks and then do what you actually want from there.