From b5d6051d98befe95012c52149b012303be1368c7 Mon Sep 17 00:00:00 2001 From: nillerusr Date: Tue, 22 Aug 2023 11:38:13 +0300 Subject: [PATCH] cstrike: optimize flashbang --- game/client/cstrike/cs_view_scene.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/game/client/cstrike/cs_view_scene.cpp b/game/client/cstrike/cs_view_scene.cpp index 9b02442f..34372b91 100644 --- a/game/client/cstrike/cs_view_scene.cpp +++ b/game/client/cstrike/cs_view_scene.cpp @@ -152,13 +152,13 @@ void CCSViewRender::PerformNightVisionEffect( const CViewSetup &view ) render->ViewDrawFade( overlaycolor, pMaterial ); // Only one pass in DX7. - if ( g_pMaterialSystemHardwareConfig->GetDXSupportLevel() >= 80 ) +/* if ( g_pMaterialSystemHardwareConfig->GetDXSupportLevel() >= 80 ) { CMatRenderContextPtr pRenderContext( materials ); pRenderContext->DrawScreenSpaceQuad( pMaterial ); render->ViewDrawFade( overlaycolor, pMaterial ); pRenderContext->DrawScreenSpaceQuad( pMaterial ); - } + }*/ } } } @@ -211,6 +211,7 @@ void CCSViewRender::PerformFlashbangEffect( const CViewSetup &view ) render->ViewDrawFade( overlaycolor, pMaterial ); // just do one pass for dxlevel < 80. +/* if (g_pMaterialSystemHardwareConfig->GetDXSupportLevel() >= 80) { pRenderContext->DrawScreenSpaceRectangle( pMaterial, view.x, view.y, view.width, view.height, @@ -221,6 +222,7 @@ void CCSViewRender::PerformFlashbangEffect( const CViewSetup &view ) 0, 0, m_pFlashTexture->GetActualWidth()-1, m_pFlashTexture->GetActualHeight()-1, m_pFlashTexture->GetActualWidth(), m_pFlashTexture->GetActualHeight() ); } +*/ } else if ( m_pFlashTexture ) { @@ -233,7 +235,7 @@ void CCSViewRender::PerformFlashbangEffect( const CViewSetup &view ) render->ViewDrawFade( overlaycolor, pMaterial ); // just do one pass for dxlevel < 80. - if (g_pMaterialSystemHardwareConfig->GetDXSupportLevel() >= 80) +/* if (g_pMaterialSystemHardwareConfig->GetDXSupportLevel() >= 80) { pRenderContext->DrawScreenSpaceRectangle( pMaterial, view.x, view.y, view.width, view.height, 0, 0, m_pFlashTexture->GetActualWidth()-1, m_pFlashTexture->GetActualHeight()-1, @@ -242,7 +244,7 @@ void CCSViewRender::PerformFlashbangEffect( const CViewSetup &view ) pRenderContext->DrawScreenSpaceRectangle( pMaterial, view.x, view.y, view.width, view.height, 0, 0, m_pFlashTexture->GetActualWidth()-1, m_pFlashTexture->GetActualHeight()-1, m_pFlashTexture->GetActualWidth(), m_pFlashTexture->GetActualHeight() ); - } + }*/ } // this does the pure white overlay part of the flashbang effect.