diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 7a951592..1ddec9ec 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -71,6 +71,7 @@ convar_t *cl_lw; convar_t *cl_charset; convar_t *cl_trace_messages; convar_t *hud_utf8; +convar_t *ui_renderworld; // // userinfo @@ -2856,6 +2857,7 @@ void CL_InitLocal( void ) Cvar_Get( "cl_background", "0", FCVAR_READ_ONLY, "indicate what background map is running" ); cl_showevents = Cvar_Get( "cl_showevents", "0", FCVAR_ARCHIVE, "show events playback" ); Cvar_Get( "lastdemo", "", FCVAR_ARCHIVE, "last played demo" ); + ui_renderworld = Cvar_Get( "ui_renderworld", "0", FCVAR_ARCHIVE, "render world when UI is visible" ); // these two added to shut up CS 1.5 about 'unknown' commands Cvar_Get( "lightgamma", "1", FCVAR_ARCHIVE, "ambient lighting level (legacy, unused)" ); diff --git a/engine/client/cl_view.c b/engine/client/cl_view.c index 20d61941..8146c469 100644 --- a/engine/client/cl_view.c +++ b/engine/client/cl_view.c @@ -315,7 +315,7 @@ void V_RenderView( void ) ref_viewpass_t rvp; int viewnum = 0; - if( !cl.video_prepped || ( UI_IsVisible() && !cl.background )) + if( !cl.video_prepped || ( !ui_renderworld->value && UI_IsVisible() && !cl.background )) return; // still loading V_CalcViewRect (); // compute viewport rectangle diff --git a/engine/client/client.h b/engine/client/client.h index 32915802..a0971ed3 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -689,8 +689,9 @@ extern convar_t *scr_loading; extern convar_t *v_dark; // start from dark extern convar_t *net_graph; extern convar_t *rate; -extern convar_t *m_ignore; -extern convar_t *r_showtree; +extern convar_t *m_ignore; +extern convar_t *r_showtree; +extern convar_t *ui_renderworld; //=============================================================================