intellild
12-12-2021, 01:41
https://github.com/intellild/sm_extension/tree/master/player_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 (https://forums.alliedmods.net/showthread.php?p=2765747#post2765747)
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.
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 (https://forums.alliedmods.net/showthread.php?p=2765747#post2765747)
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.