Don't use ent_next loop each frame, it is slow if you have lots of entities to cycle through. Easiest is to use c_scan for detection and than optionally trace to check if entity can really see other entity.
If you want to cycle through many / all objects, store those objects in a pointer array and loop through them in a for loop.
vec_dist can also be helpful and is fast.

Anyone actually know if it is faster to have separate whiles for entities or if you loop through them each frame in a for or while loop? I guess the latter right?

Last edited by Reconnoiter; 06/09/17 22:18.