1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-01-04 00:23:25 +08:00
hl2sdk/entity2/entityidentity.cpp

17 lines
552 B
C++
Raw Normal View History

#include "entityidentity.h"
#include "entitysystem.h"
#include "tier1/strtools.h"
bool CEntityIdentity::NameMatches( const char* pszNameOrWildcard ) const
{
if ( pszNameOrWildcard && pszNameOrWildcard[0] == '!' )
return GameEntitySystem()->FindEntityProcedural( pszNameOrWildcard ) == m_pInstance;
return V_CompareNameWithWildcards( pszNameOrWildcard, m_name.String() ) == 0;
}
bool CEntityIdentity::ClassMatches( const char* pszClassOrWildcard ) const
{
return V_CompareNameWithWildcards( pszClassOrWildcard, m_designerName.String() ) == 0;
}