//-----------------------------------------------------------------------------
// Purpose: Handle commands sent from vgui panels on the client 
//-----------------------------------------------------------------------------
bool CObjectBuffStation::ClientCommand( CBaseTFPlayer *pPlayer, const char *pCmd, ICommandArguments *pArg )
{
	if ( FStrEq( pCmd, "toggle_connect" ) )
	{
		UpdatePlayerAttachment( pPlayer );
		return true;
	}

	return BaseClass::ClientCommand( pPlayer, pCmd, pArg );
}
//-----------------------------------------------------------------------------
// Purpose: Handle commands sent from vgui panels on the client 
//-----------------------------------------------------------------------------
bool CObjectBuffStation::ClientCommand(CBaseTFPlayer *pPlayer, const CCommand &args)
{
	const char *pCmd = args[0];

	if ( FStrEq( pCmd, "toggle_connect" ) )
	{
		UpdatePlayerAttachment( pPlayer );
		return true;
	}

	return BaseClass::ClientCommand( pPlayer, args );
}
//-----------------------------------------------------------------------------
// Purpose: Attach to players who touch me
//-----------------------------------------------------------------------------
void CObjectBuffStation::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
	if ( useType == USE_ON )
	{
		// See if the activator is a player
		if ( !pActivator->IsPlayer() || !InSameTeam( pActivator ) || !pActivator->CanBePoweredUp() )
			return;

		CBaseTFPlayer *pPlayer = static_cast<CBaseTFPlayer*>(pActivator);
		if ( pPlayer )
			UpdatePlayerAttachment( pPlayer );
	}

	BaseClass::Use( pActivator, pCaller, useType, value );
}