Oliver wrote:
--
[ Picked text/plain from multipart/alternative ]
CONTEXT: In our mod, users create event-driven worlds.  Events exist such as
InRadius15 (i.e. for object O, when any object is in 15 units, the
InRadius15 event is triggered).

PROBLEM: The code to hook these events is not as optimized as we would
prefer.  On maps where a large number of objects have code for their
InRadiusXX events, there is a noticeable 'chug' effect with each think tick.

QUESTION: Is UTIL_EntitiesInSphere(...) the quickest way to get a list of
entities within a particular radius of a vector?

Rather than doing the UTIL_EntitiesInSphere() check every Think tick,
you could create a timer interval so that you only do this check every
so often (every 0.1 seconds or every 0.5 seconds, etc.).

Doing the UTIL_EntitiesInSphere() check every tick would cause the
engine to have to interate through all entities every tick.

--
Jeffrey "botman" Broome

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to