//----------------------------------------------------------------------------- // Purpose: // Input : updateType - //----------------------------------------------------------------------------- void CEnvLaserDesignation::OnDataChanged( DataUpdateType_t updateType ) { BaseClass::OnDataChanged( updateType ); if ( m_bActive != m_bPrevActive ) { ENTITY_PANEL_ACTIVATE( "laserdesignation", m_bActive ); } m_bPrevActive = m_bActive.Get(); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void C_ResourceZone::OnDataChanged( DataUpdateType_t updateType ) { BaseClass::OnDataChanged( updateType ); if ( updateType == DATA_UPDATE_CREATED ) { SetNextClientThink( gpGlobals->curtime + 1.0 ); } // If I've just dried up, remove me from the minimap if ( m_flClientResources <= 0 ) { ENTITY_PANEL_ACTIVATE( "resourcezone", false ); DESTRUCT_MINIMAP_PANEL(); } }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CEnvLaserDesignation::SetActive( bool bActive ) { if ( bActive == m_bActive ) return; if ( !bActive ) { m_fEffects |= EF_NODRAW; } else { m_fEffects |= EF_NOINTERP; m_fEffects &= ~EF_NODRAW; } NetworkStateChanged(); #if defined( CLIENT_DLL ) ENTITY_PANEL_ACTIVATE( "laserdesignation", bActive ); #endif m_bActive = bActive; }
//----------------------------------------------------------------------------- // Add, remove object from the panel //----------------------------------------------------------------------------- void CEnvLaserDesignation::SetDormant( bool bDormant ) { BaseClass::SetDormant( bDormant ); ENTITY_PANEL_ACTIVATE( "laserdesignation", (!bDormant && m_bActive) ); }
void C_ObjectResourcePump::SetDormant( bool bDormant ) { BaseClass::SetDormant( bDormant ); ENTITY_PANEL_ACTIVATE( "resource_pump", !bDormant ); }
//----------------------------------------------------------------------------- // Add, remove object from the panel //----------------------------------------------------------------------------- void C_ResourceZone::SetDormant( bool bDormant ) { BaseClass::SetDormant( bDormant ); ENTITY_PANEL_ACTIVATE( "resourcezone", (!bDormant && m_flClientResources > 0) ); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void C_ObjectSentrygun::SetDormant( bool bDormant ) { BaseClass::SetDormant( bDormant ); ENTITY_PANEL_ACTIVATE( "sentrygun", !bDormant ); }