- Change how render cull sliders work: only allow reasonable values.

This commit is contained in:
drfrag 2019-09-06 20:58:59 +02:00
parent 6879817cd8
commit e94d18ab02
3 changed files with 20 additions and 4 deletions

View file

@ -1436,3 +1436,16 @@ CCMD(r_showcaps)
PRINT_CAP("Truecolor Enabled", RFF_TRUECOLOR)
PRINT_CAP("Voxels", RFF_VOXELS)
}
EXTERN_CVAR(Float, r_sprite_distance_cull)
EXTERN_CVAR(Float, r_line_distance_cull)
EXTERN_CVAR(Float, gl_sprite_distance_cull)
EXTERN_CVAR(Float, gl_line_distance_cull)
CCMD(disablerendercull)
{
r_sprite_distance_cull = 0.0;
r_line_distance_cull = 0.0;
gl_sprite_distance_cull = 0.0;
gl_line_distance_cull = 0.0;
}

View file

@ -1893,6 +1893,7 @@ DSPLYMNU_MODELS = "Models";
DSPLYMNU_SCALEFUZZ = "Scale fuzz effect";
DSPLYMNU_SPRITECULL = "Sprite Cull Distance";
DSPLYMNU_LINECULL = "Wall Cull Distance";
DSPLYMNU_DISABLERENDERCULL = "Disable Render Culling";
DSPLYMNU_DRAWFUZZ = "Use fuzz effect";
DSPLYMNU_OLDTRANS = "Classic Transparency";
DSPLYMNU_TRANSSOUL = "Lost Soul translucency";

View file

@ -882,8 +882,9 @@ OptionMenu "SWROptions" protected
Option "$DSPLYMNU_SCALEFUZZ", "r_fuzzscale", "OnOff"
Option "$DSPLYMNU_MODELS", "r_models", "OnOff"
StaticText " "
ScaleSlider "$DSPLYMNU_SPRITECULL", "r_sprite_distance_cull", 0.0, 8000.0, 500.0, "Disabled"
ScaleSlider "$DSPLYMNU_LINECULL", "r_line_distance_cull", 0.0, 16000.0, 1000.0, "Disabled"
Slider "$DSPLYMNU_SPRITECULL", "r_sprite_distance_cull", 2000.0, 8000.0, 500.0, 0
Slider "$DSPLYMNU_LINECULL", "r_line_distance_cull", 4000.0, 16000.0, 1000.0, 0
Command "$DSPLYMNU_DISABLERENDERCULL", "disablerendercull"
}
OptionMenu "VideoOptions" protected
@ -2595,8 +2596,9 @@ OptionMenu "OpenGLOptions" protected
Option "$GLPREFMNU_PARTICLESTYLE", gl_particles_style, "Particles"
Option "$GLPREFMNU_RENDERQUALITY", gl_render_precise, "Precision"
StaticText " "
ScaleSlider "$DSPLYMNU_SPRITECULL", gl_sprite_distance_cull, 0.0, 8000.0, 500.0, "Disabled"
ScaleSlider "$DSPLYMNU_LINECULL", gl_line_distance_cull, 0.0, 16000.0, 1000.0, "Disabled"
Slider "$DSPLYMNU_SPRITECULL", gl_sprite_distance_cull, 2000.0, 8000.0, 500.0, 0
Slider "$DSPLYMNU_LINECULL", gl_line_distance_cull, 4000.0, 16000.0, 1000.0, 0
Command "$DSPLYMNU_DISABLERENDERCULL", "disablerendercull"
StaticText " "
Slider "$GLPREFMNU_MENUBLUR", gl_menu_blur, 0, 5.0, 0.5, 2
StaticText " "