From 8163bced2c29e22629b3c3c3541d131fed00bfdf Mon Sep 17 00:00:00 2001 From: Night Owl Date: Wed, 12 Apr 2017 02:02:18 +0500 Subject: [PATCH] Do not break hud_takesshots cvar behavior. --- cl_dll/hud_redraw.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cl_dll/hud_redraw.cpp b/cl_dll/hud_redraw.cpp index b5314961..c30df36d 100644 --- a/cl_dll/hud_redraw.cpp +++ b/cl_dll/hud_redraw.cpp @@ -93,6 +93,13 @@ int CHud::Redraw( float flTime, int intermission ) if( m_flTimeDelta < 0 ) m_flTimeDelta = 0; + if( !m_iIntermission && intermission ) + { + // Take a screenshot if the client's got the cvar set + if( CVAR_GET_FLOAT( "hud_takesshots" ) != 0 ) + m_flShotTime = flTime + 1.0; // Take a screenshot in a second + } + if( m_flShotTime && m_flShotTime < flTime ) { gEngfuncs.pfnClientCmd( "snapshot\n" );