1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00

Add CEntityKeyValues IO accessors (#216)

This commit is contained in:
xen 2024-03-10 18:25:40 +02:00 committed by GitHub
parent 2adc0ac795
commit 01fe5d997b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View File

@ -187,6 +187,14 @@ void CEntityKeyValues::AddConnectionDesc(
desc->m_nTimesToFire = nTimesToFire;
}
void CEntityKeyValues::RemoveConnectionDesc( int nDesc )
{
if (m_nQueuedForSpawnCount > 0)
return;
m_connectionDescs.Remove( nDesc );
}
void CEntityKeyValues::CopyFrom( const CEntityKeyValues* pSrc, bool bRemoveAllKeys, bool bSkipEHandles )
{
if ( bRemoveAllKeys )

View File

@ -105,6 +105,11 @@ public:
float flDelay,
int32 nTimesToFire );
void RemoveConnectionDesc( int nDesc );
EntityIOConnectionDescFat_t* GetConnectionDesc( int nDesc ) { return &m_connectionDescs[nDesc]; }
int GetNumConnectionDescs() const { return m_connectionDescs.Count(); }
void CopyFrom( const CEntityKeyValues* pSrc, bool bRemoveAllKeys = false, bool bSkipEHandles = false );
void RemoveKeyValue( const EntityKeyId_t &id );
void RemoveAllKeys();