//----------------------------------------------------------------------------- // Use this to turn on/off the presence of an underlying game entity //----------------------------------------------------------------------------- void CClientTools::SetEnabled( HTOOLHANDLE handle, bool enabled ) { int idx = m_Handles.Find( HToolEntry_t( handle ) ); if ( idx == m_Handles.InvalidIndex() ) return; HToolEntry_t *slot = &m_Handles[ idx ]; Assert( slot ); if ( slot == NULL ) return; C_BaseEntity *ent = slot->m_hEntity.Get(); if ( ent == NULL || ent->entindex() == 0 ) return; // Don't disable/enable the "world" ent->EnableInToolView( enabled ); }