Browse Source

engine: client: port ui_renderworld from old engine

pull/2/head
Alibek Omarov 5 years ago
parent
commit
ff1b28244b
  1. 2
      engine/client/cl_main.c
  2. 2
      engine/client/cl_view.c
  3. 5
      engine/client/client.h

2
engine/client/cl_main.c

@ -71,6 +71,7 @@ convar_t *cl_lw; @@ -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 ) @@ -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)" );

2
engine/client/cl_view.c

@ -315,7 +315,7 @@ void V_RenderView( void ) @@ -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

5
engine/client/client.h

@ -689,8 +689,9 @@ extern convar_t *scr_loading; @@ -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;
//=============================================================================

Loading…
Cancel
Save