mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-28 22:57:55 +03:00
Fix filter_activator_model issues with save/restore and null activator
This commit is contained in:
parent
178a262032
commit
06596695a3
@ -996,6 +996,9 @@ public:
|
||||
|
||||
bool PassesFilterImpl( CBaseEntity *pCaller, CBaseEntity *pEntity )
|
||||
{
|
||||
if (!pEntity)
|
||||
return false;
|
||||
|
||||
if (FStrEq(STRING(m_strFilterSkin), "-1") /*m_strFilterSkin == NULL_STRING|| FStrEq(STRING(m_strFilterSkin), "")*/)
|
||||
return Matcher_NamesMatch(STRING(m_iFilterModel), STRING(pEntity->GetModelName()));
|
||||
else if (pEntity->GetBaseAnimating())
|
||||
@ -1011,6 +1014,17 @@ public:
|
||||
inputdata.value.Convert(FIELD_STRING);
|
||||
m_iFilterModel = inputdata.value.StringID();
|
||||
}
|
||||
|
||||
bool KeyValue( const char *szKeyName, const char *szValue )
|
||||
{
|
||||
if (FStrEq( szKeyName, "filtername" ))
|
||||
{
|
||||
m_iFilterModel = AllocPooledString( szValue );
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return BaseClass::KeyValue( szKeyName, szValue );
|
||||
}
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( filter_activator_model, CFilterModel );
|
||||
@ -1019,7 +1033,6 @@ BEGIN_DATADESC( CFilterModel )
|
||||
|
||||
// Keyfields
|
||||
DEFINE_KEYFIELD( m_iFilterModel, FIELD_STRING, "filtermodel" ),
|
||||
DEFINE_KEYFIELD( m_iFilterModel, FIELD_STRING, "filtername" ),
|
||||
DEFINE_KEYFIELD( m_strFilterSkin, FIELD_STRING, "skin" ),
|
||||
|
||||
END_DATADESC()
|
||||
|
Loading…
x
Reference in New Issue
Block a user