//----------------------------------------------------------------------------- // Purpose: Given a player and optional name returns the entity of that // classname that the player is nearest facing // // Input : // Output : //----------------------------------------------------------------------------- CBaseEntity* FindEntity( edict_t *pEdict, char *classname) { // If no name was given set bits based on the picked if (FStrEq(classname,"")) return (FindPickerEntityClass( static_cast<CBasePlayer*>(GetContainingEntity(pEdict)), classname )); return NULL; }
//----------------------------------------------------------------------------- // Purpose: Given a player and optional name returns the entity of that // classname that the player is nearest facing // // Input : // Output : //----------------------------------------------------------------------------- CBaseEntity* FindEntity( edict_t *pEdict, char *classname) { // If no name was given set bits based on the picked if (FStrEq(classname,"")) { return (FindPickerEntityClass( (CBasePlayer*)pEdict->m_pEnt, classname )); } return NULL; }