Josh wrote:
Yea that's what I was thinking :(  I was really hoping to not do that, as a
LOT of functions will need to call that function. (I'm working on a war3 mod
for CSS, just building the groundwork).  So every time someone is shot /
died that will be called twice.  Doesn't that seem intensive? Do you think
valve could create an easier way?

You need the updated value eveyframe?

often its better to build linked list with interesting values than
querying everything everywhere.

- a linked list of players
- a linked list of waypoints, etc.
- a linked list of buildings, etc..

Having to search everything to search the nearest Orc building its a bad
idea. While a loop with "p = p->next" its fastest than light





-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcelo Bezerra Sent: Monday, December 20, 2004 2:46 PM To: [EMAIL PROTECTED] Subject: Re: [hlcoders] Finding the entity based on the userid


for(int i=1;i<=maxplayers;i++) { edict_t *pEntity = engine->PEntityOfEntIndex(i); if(!pEntity || pEntity->IsFree()) { continue; } int uid = engine->GetPlayerUserId(pEntity); }


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



Reply via email to