1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 12:06:07 +08:00
Files
hl2sdk/entity2/entityidentity.cpp
vanz696 b2301a9ac3 Add CEntityKeyValues, EntityInstanceIter_t, EntityInstanceByNameIter_t, EntityInstanceByClassIter_t & other stuff (#183)
* Replace g_pEntitySystem with GameEntitySystem() function;
* KeyValues3, CGameSystem & CVariant updates;
2023-12-23 20:03:58 +03:00

17 lines
483 B
C++

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