本文整理汇总了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 );
}
示例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 );
}
示例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 );
}
示例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);
}
}
示例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" );
}
}
}