Raised This Month: $121 Target: $400
 30% 

[INFO] Fakemeta & Ham detailed function descriptions and examples


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
AlexALX
Senior Member
Join Date: Apr 2009
Old 09-08-2010 , 18:24   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #16

Quote:
int UTIL_EntitiesInBox( CBaseEntity **pList, int listMax, const Vector &mins, const Vector &maxs, int flagMask )
{
edict_t *pEdict = g_engfuncs.pfnPEntityOfEntIndex( 1 );
CBaseEntity *pEntity;
int count;

count = 0;

if ( !pEdict )
return count;

for ( int i = 1; i < gpGlobals->maxEntities; i++, pEdict++ )
{
if ( pEdict->free ) // Not in use
continue;

if ( flagMask && !(pEdict->v.flags & flagMask) ) // Does it meet the criteria?
continue;

if ( mins.x > pEdict->v.absmax.x ||
mins.y > pEdict->v.absmax.y ||
mins.z > pEdict->v.absmax.z ||
maxs.x < pEdict->v.absmin.x ||
maxs.y < pEdict->v.absmin.y ||
maxs.z < pEdict->v.absmin.z )
continue;

pEntity = CBaseEntity::Instance(pEdict);
if ( !pEntity )
continue;

pList[ count ] = pEntity;
count++;

if ( count >= listMax )
return count;
}

return count;
}
What is this?

Last edited by AlexALX; 09-08-2010 at 18:31.
AlexALX is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:57.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode