From dfb49e78b5d9bcb15f1b5105f4d1cc5564246781 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Wed, 11 Apr 2018 02:01:42 -0500 Subject: [PATCH] Make setting r_stencilbits more consistent in Team Arena UI I changed Color Depth options 'Default' to reset r_stencilbits instead of 0 and '32 bit' to use r_stencilbits 8 instead of not changing the value. (This matches my q3_ui changes in the previous commit.) Set r_stencilbits when changing graphics presets like when changing Color Depth. --- code/ui/ui_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/ui/ui_main.c b/code/ui/ui_main.c index c1f91364b8..66e897c3cf 100644 --- a/code/ui/ui_main.c +++ b/code/ui/ui_main.c @@ -3057,7 +3057,7 @@ static void UI_Update(const char *name) { switch (val) { case 0: trap_Cvar_SetValue( "r_depthbits", 0 ); - trap_Cvar_SetValue( "r_stencilbits", 0 ); + trap_Cvar_Reset( "r_stencilbits" ); break; case 16: trap_Cvar_SetValue( "r_depthbits", 16 ); @@ -3065,6 +3065,7 @@ static void UI_Update(const char *name) { break; case 32: trap_Cvar_SetValue( "r_depthbits", 24 ); + trap_Cvar_SetValue( "r_stencilbits", 8 ); break; } } else if (Q_stricmp(name, "r_lodbias") == 0) { @@ -3088,6 +3089,7 @@ static void UI_Update(const char *name) { trap_Cvar_SetValue( "r_lodbias", 0 ); trap_Cvar_SetValue( "r_colorbits", 32 ); trap_Cvar_SetValue( "r_depthbits", 24 ); + trap_Cvar_SetValue( "r_stencilbits", 8 ); trap_Cvar_SetValue( "r_picmip", 0 ); trap_Cvar_SetValue( "r_mode", 4 ); trap_Cvar_SetValue( "r_texturebits", 32 ); @@ -3103,7 +3105,8 @@ static void UI_Update(const char *name) { trap_Cvar_SetValue( "r_vertexlight", 0 ); trap_Cvar_SetValue( "r_lodbias", 0 ); trap_Cvar_SetValue( "r_colorbits", 0 ); - trap_Cvar_SetValue( "r_depthbits", 24 ); + trap_Cvar_SetValue( "r_depthbits", 0 ); + trap_Cvar_Reset( "r_stencilbits" ); trap_Cvar_SetValue( "r_picmip", 1 ); trap_Cvar_SetValue( "r_mode", 3 ); trap_Cvar_SetValue( "r_texturebits", 0 ); @@ -3120,6 +3123,7 @@ static void UI_Update(const char *name) { trap_Cvar_SetValue( "r_lodbias", 1 ); trap_Cvar_SetValue( "r_colorbits", 0 ); trap_Cvar_SetValue( "r_depthbits", 0 ); + trap_Cvar_Reset( "r_stencilbits" ); trap_Cvar_SetValue( "r_picmip", 1 ); trap_Cvar_SetValue( "r_mode", 3 ); trap_Cvar_SetValue( "r_texturebits", 0 ); @@ -3136,6 +3140,7 @@ static void UI_Update(const char *name) { trap_Cvar_SetValue( "r_lodbias", 2 ); trap_Cvar_SetValue( "r_colorbits", 16 ); trap_Cvar_SetValue( "r_depthbits", 16 ); + trap_Cvar_SetValue( "r_stencilbits", 0 ); trap_Cvar_SetValue( "r_mode", 3 ); trap_Cvar_SetValue( "r_picmip", 2 ); trap_Cvar_SetValue( "r_texturebits", 16 );