Raised This Month: $ Target: $400
 0% 

Proper client iteration


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
psychonic

BAFFLED
Join Date: May 2008
Old 09-18-2013 , 08:11   Re: Proper client iteration
Reply With Quote #1

Quote:
Originally Posted by hlstriker View Post
Here is the bug report that made me think this:
https://bugs.alliedmods.net/show_bug.cgi?id=5757

So if GetMaxHumanPlayers only returns the number of humans, then the only option for CS:GO is to use MaxClients which always returns 64. Is there no function to get the number of humans + bots so we don't need to iterate over 64 indexes every time when most of the time only 1/2 - 1/3 of those indexes will actually have players.

Even after adding bots to the server GetMaxHumanPlayers is still showing 16 (which is what I have maxplayers set to).
It's on a game-by-game basis since that function can be implemented differently in different games.

In this specific case, you can use it for the count of players that can be in the server, including bots, since CS:GO doesn't add bots beyond that count. It just uses them to replace humans when desired, up to that count.

Last edited by psychonic; 09-18-2013 at 17:38.
psychonic is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 09-18-2013 , 15:36   Re: Proper client iteration
Reply With Quote #2

Quote:
Originally Posted by psychonic View Post
You still need to iterate over all of the indexes.
So for example if my servers maxplayers is set to 16 would clients use entity indexes greater than 16?

I was under the impression the clients entity index would only go as high as the servers maxplayers value. So in this example entity index 17-64 would not be used for the clients. Am I wrong?

Last edited by hlstriker; 09-18-2013 at 15:37.
hlstriker is offline
psychonic

BAFFLED
Join Date: May 2008
Old 09-18-2013 , 17:39   Re: Proper client iteration
Reply With Quote #3

Quote:
Originally Posted by hlstriker View Post
So for example if my servers maxplayers is set to 16 would clients use entity indexes greater than 16?

I was under the impression the clients entity index would only go as high as the servers maxplayers value. So in this example entity index 17-64 would not be used for the clients. Am I wrong?
Sorry for the confusion. I typed that line first and then meant to remove it when typing the rest.

In that case 17-64 could technically be clients (and won't be anything else), but will be empty in practice.
psychonic 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 14:27.


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