当前位置: 首页>>代码示例>>C++>>正文


C++ ConVarRef::SetValue方法代码示例

本文整理汇总了C++中ConVarRef::SetValue方法的典型用法代码示例。如果您正苦于以下问题:C++ ConVarRef::SetValue方法的具体用法?C++ ConVarRef::SetValue怎么用?C++ ConVarRef::SetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ConVarRef的用法示例。


在下文中一共展示了ConVarRef::SetValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: LevelInit

void ClientModeHLNormal::LevelInit( const char *newmap )
{
	// reset ambient light
	static ConVarRef mat_ambient_light_r( "mat_ambient_light_r" );
	static ConVarRef mat_ambient_light_g( "mat_ambient_light_g" );
	static ConVarRef mat_ambient_light_b( "mat_ambient_light_b" );

	if ( mat_ambient_light_r.IsValid() )
	{
		mat_ambient_light_r.SetValue( "0" );
	}

	if ( mat_ambient_light_g.IsValid() )
	{
		mat_ambient_light_g.SetValue( "0" );
	}

	if ( mat_ambient_light_b.IsValid() )
	{
		mat_ambient_light_b.SetValue( "0" );
	}

	BaseClass::LevelInit(newmap);

	// sdk: make sure no windows are left open from before
	SDK_CloseAllWindows();

	// clear any DSP effects
	CLocalPlayerFilter filter;
	enginesound->SetRoomType( filter, 0 );
	enginesound->SetPlayerDSP( filter, 0, true );
}
开发者ID:RubberWar,项目名称:Portal-2,代码行数:32,代码来源:clientmode_hlnormal.cpp

示例2: OnFrame

void ShaderEditorInterface::OnFrame( float frametime )
{
	if ( IsInEditMode() )
	{
		static ConVarRef qMode( "mat_queue_mode" );
#if defined( SHADER_EDITOR_DLL_SWARM ) || defined( SHADER_EDITOR_DLL_2013 )
		qMode.SetValue( "0" );
#else
		qMode.SetValue( "-1" );
#endif
	}

	IGameSystem::UpdateAllSystems( frametime );
}
开发者ID:Biohazard90,项目名称:source-shader-editor,代码行数:14,代码来源:editorinit.cpp

示例3: LevelInit

//====================================================================
// Prepara al Cliente para el inicio de un nivel
//====================================================================
void InClientMode::LevelInit( const char *newmap )
{
	// Reiniciamos la luz de ambiente
	static ConVarRef mat_ambient_light_r( "mat_ambient_light_r" );
	static ConVarRef mat_ambient_light_g( "mat_ambient_light_g" );
	static ConVarRef mat_ambient_light_b( "mat_ambient_light_b" );

	if ( mat_ambient_light_r.IsValid() )
		mat_ambient_light_r.SetValue( "0" );
	if ( mat_ambient_light_g.IsValid() )
		mat_ambient_light_g.SetValue( "0" );
	if ( mat_ambient_light_b.IsValid() )
		mat_ambient_light_b.SetValue( "0" );

	BaseClass::LevelInit( newmap );

	// clear any DSP effects
	CLocalPlayerFilter filter;
	enginesound->SetRoomType( filter, 0 );
	enginesound->SetPlayerDSP( filter, 0, true );
}
开发者ID:InfoSmart,项目名称:InSource,代码行数:24,代码来源:clientmode_sdk.cpp

示例4: DoClick

//-----------------------------------------------------------------------------
// Purpose:	Activate a button click.
//-----------------------------------------------------------------------------
void Button::DoClick()
{
	SetSelected(true);
	FireActionSignal();
	PlayButtonReleasedSound();

	static ConVarRef vgui_nav_lock( "vgui_nav_lock" );
	if ( ( !vgui_nav_lock.IsValid() || vgui_nav_lock.GetInt() == 0 ) && NavigateActivate() )
	{
		vgui_nav_lock.SetValue( 1 );
	}

	if ( !m_bStaySelectedOnClick )
	{
		SetSelected(false);
	}
}
开发者ID:Asunaya,项目名称:game,代码行数:20,代码来源:Button.cpp

示例5: OnCompletedAsyncDeviceAttached

//=============================================================================
void CUIGameData::OnCompletedAsyncDeviceAttached( CAsyncCtxUIOnDeviceAttached * job )
{
    ISelectStorageDeviceClient *pStorageDeviceClient = m_pSelectStorageClient;
    m_pSelectStorageClient = NULL;

    static ConVarRef mm_dlcs_mask_extras( "mm_dlcs_mask_extras" );
    if ( mm_dlcs_mask_extras.IsValid() )
    {
#ifdef _X360
        int iDLCmask = mm_dlcs_mask_extras.GetInt();

        if ( engine->IsLowViolence() && XGetGameRegion() == XC_GAME_REGION_EUROPE_REST )
        {
            // iDLCmask |= ( 1 << ? );
        }

        mm_dlcs_mask_extras.SetValue( iDLCmask );
#endif
    }

    uint nRet = job ? job->GetContainerOpenResult() : ERROR_SUCCESS;
    if ( nRet != ERROR_SUCCESS )
    {
        CloseWaitScreen( NULL, "ReportDeviceCorrupt" );
        pStorageDeviceClient->OnDeviceFail( ISelectStorageDeviceClient::FAIL_CORRUPT );
    }
    else
    {
        // Notify that data has loaded
        pStorageDeviceClient->AfterDeviceMounted();

        // Check for opening a new storage device immediately
        if ( m_pSelectStorageClient == NULL )
        {
            // Close down the waiting screen
            CloseWaitScreen( NULL, "OnCompletedAsyncDeviceAttached" );
        }
    }
}
开发者ID:SCell555,项目名称:hl2-asw-port,代码行数:40,代码来源:uigamedata_storage.cpp


注:本文中的ConVarRef::SetValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。