[CSGO] Player distances in real time
https://github.com/intellild/sm_exte...layer_distance
This extension computes player distance in real time and providers a simple rule extension for plugins depends on player distances to each other, for example, hide teammates This extension make use of SIMD features of the CPU to get best performance for computing player distances. (Thanks to compilers, we don't need to write SIMD code by hand in most cases) On my machine (3700x), the compute for 64 player is around 0.2ms(200000ns). So we can compute player distances every game frame. |
Re: [CSGO] Player distances in real time
PHP Code:
dist1 = 0.000151 dist2 = 0.000059 ( ) dist2 = 0.000054 (squared) The profiler uses QueryPerformanceCounter, thus the result should be enough in this case. I mean sourcemod JIT is not that bad, and the major overhead is expected to be brand prediction missing and cache missing, not the calculation itself. Total float operation is 48*48*(3+3) = 13824 (let multiplication and addition be the same), which is not that much at all for a morden cpu. |
All times are GMT -4. The time now is 10:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.