2023-12-23 20:03:58 +03:00
|
|
|
#include "entityidentity.h"
|
|
|
|
#include "entitysystem.h"
|
|
|
|
#include "tier1/strtools.h"
|
|
|
|
|
2024-01-26 05:11:01 +03:00
|
|
|
bool CEntityIdentity::NameMatches( const char* pszNameOrWildcard ) const
|
2023-12-23 20:03:58 +03:00
|
|
|
{
|
2024-01-26 05:11:01 +03:00
|
|
|
if ( pszNameOrWildcard && pszNameOrWildcard[0] == '!' )
|
|
|
|
return GameEntitySystem()->FindEntityProcedural( pszNameOrWildcard ) == m_pInstance;
|
2023-12-23 20:03:58 +03:00
|
|
|
|
2024-01-26 05:11:01 +03:00
|
|
|
return V_CompareNameWithWildcards( pszNameOrWildcard, m_name.String() ) == 0;
|
2023-12-23 20:03:58 +03:00
|
|
|
}
|
|
|
|
|
2024-01-26 05:11:01 +03:00
|
|
|
bool CEntityIdentity::ClassMatches( const char* pszClassOrWildcard ) const
|
2023-12-23 20:03:58 +03:00
|
|
|
{
|
2024-01-26 05:11:01 +03:00
|
|
|
return V_CompareNameWithWildcards( pszClassOrWildcard, m_designerName.String() ) == 0;
|
2023-12-23 20:03:58 +03:00
|
|
|
}
|