find_sphere_class, how speccialy does it work?
Hi,
I did not found on internet information about, how entities in Code:
find_sphere_class(aroundent, const _lookforclassname[], Float:radius, entlist[], maxents, const Float:origin[3])I mean, if I will set radius to 1000.0, Do entities in variable entlist will be ordered by nearest? eg. we have 5 entities in 1000.0 range from entity 50. So, entlist[0] will return nearest ent? |
Re: find_sphere_class, how speccialy does it work?
PHP Code:
|
Re: find_sphere_class, how speccialy does it work?
You did not helped me.
Quote:
I know that it contains all elements in this radius, but I want to know if variable entlist is ordered ascending/descending by distance from aroundend |
Re: find_sphere_class, how speccialy does it work?
Oh, I have no clue, thought that would help so I posted it.
Check these : https://forums.alliedmods.net/showpo...64&postcount=4 https://forums.alliedmods.net/showpo...89&postcount=4 https://forums.alliedmods.net/showthread.php?t=47400 |
Re: find_sphere_class, how speccialy does it work?
They are in order of entity index.
Generally that is how entity finding functions works. They loop through indexes, comparing distance and if it's within range, return it.
Spoiler
Usually sorting is not important and therefor a waste of resources. However, you can always sort them using SortCustom1D
Spoiler
|
Re: find_sphere_class, how speccialy does it work?
Thanks. That's what I wanted to know
|
| All times are GMT -4. The time now is 20:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.