Skip to content

Commit

Permalink
cstrike: optimize flashbang
Browse files Browse the repository at this point in the history
  • Loading branch information
nillerusr committed Aug 22, 2023
1 parent b73f3b7 commit b5d6051
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions game/client/cstrike/cs_view_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
}*/
}
}
}
Expand Down Expand Up @@ -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,
Expand All @@ -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 )
{
Expand All @@ -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,
Expand All @@ -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.
Expand Down

1 comment on commit b5d6051

@er2off
Copy link
Contributor

@er2off er2off commented on b5d6051 Aug 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

оптимизатор

Please sign in to comment.