Skip to content

Commit

Permalink
Make setting r_stencilbits more consistent in Team Arena UI
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zturtleman committed Apr 11, 2018
1 parent 61404e2 commit dfb49e7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions code/ui/ui_main.c
Expand Up @@ -3057,14 +3057,15 @@ 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 );
trap_Cvar_SetValue( "r_stencilbits", 0 );
break;
case 32:
trap_Cvar_SetValue( "r_depthbits", 24 );
trap_Cvar_SetValue( "r_stencilbits", 8 );
break;
}
} else if (Q_stricmp(name, "r_lodbias") == 0) {
Expand All @@ -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 );
Expand All @@ -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 );
Expand All @@ -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 );
Expand All @@ -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 );
Expand Down

0 comments on commit dfb49e7

Please sign in to comment.