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 ); }
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 ); }
//==================================================================== // 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 ); }
//----------------------------------------------------------------------------- // 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); } }
//============================================================================= 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" ); } } }