]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix messy crosshair_hittest settings in the menu:
authorterencehill <piuntn@gmail.com>
Sat, 21 Nov 2020 09:04:38 +0000 (10:04 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 21 Nov 2020 20:47:09 +0000 (21:47 +0100)
* remove crosshair_hittest_scale as it isn't used
* remove crosshair_hittest slider and its very long tooltip that was hard to read (fixes #2483)
* fix crosshair_hittest 1.25 description, it no longer enlarge the crosshair when you would hit an enemy but only shrinks it when you would hit a teammate
* add crosshair_hittest_blur_teammate setting

crosshairs.cfg
qcsrc/client/hud/crosshair.qh
qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc

index db31159a5e2b45e84d9b987a9696a8d1d674bec0..2c040259b26d838cda4f77f9ed1b6fbcf6797269 100644 (file)
@@ -35,7 +35,6 @@ set g_trueaim_minrange 44 "TrueAim minimum range (TrueAim adjusts shots so they
 seta crosshair_hittest 1 "do a crosshair hit evaluation, applying effects from the _blur and _scale cvars"
 seta crosshair_hittest_blur_teammate 0 "blur the crosshair if the shot is obstructed by a teammate"
 seta crosshair_hittest_blur_wall 1 "blur the crosshair if the shot is obstructed by a wall or object"
-seta crosshair_hittest_scale 1.25 "shrink crosshair if shot is obstructed or aiming at a teammate"
 seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact location if obstructed (debug setting, very glitchy!)"
 
 // change color based on special case
index ab725957ac7903b533bd6bcbe870f68f6c9581f6..4cd7715af49883dc82deadb9eb203e6f97ad1f2a 100644 (file)
@@ -27,7 +27,6 @@ float autocvar_crosshair_hitindication_speed;
 bool autocvar_crosshair_hittest;
 bool autocvar_crosshair_hittest_blur_teammate = 0;
 bool autocvar_crosshair_hittest_blur_wall = 1;
-//float autocvar_crosshair_hittest_scale = 1.25;
 bool autocvar_crosshair_hittest_showimpact;
 bool autocvar_crosshair_per_weapon;
 float autocvar_crosshair_pickup;
index 28a0f57a4b747a604f74157419fd5aa051f5623f..89e376e08f8f2269d8002a92253d0275b5c043ec 100644 (file)
@@ -122,23 +122,20 @@ void XonoticGameCrosshairSettingsTab_fill(entity me)
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_effect_scalefade", _("Smooth effects of crosshairs")));
                        setDependent(e, "crosshair_enabled", 1, 2);
        me.TR(me);
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Hit testing:")));
-                       setDependent(e, "crosshair_enabled", 1, 2);
-               me.TD(me, 1, 2, e = makeXonoticTextSlider_T("crosshair_hittest",
-                       _("None: do not do hit tests for the crosshair; TrueAim: blur the crosshair when there's an obstacle between your gun and the target; Enemies: also enlarge the crosshair when you would hit an enemy")));
-                       e.addValue(e, ZCTX(_("HTTST^Disabled")), "0");
-                       e.addValue(e, ZCTX(_("HTTST^TrueAim")), "1");
-                       e.addValue(e, ZCTX(_("HTTST^Enemies")), "1.25");
-                       e.configureXonoticTextSliderValues(e);
+               me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_hittest", _("Perform hit tests for the crosshair")));
                        setDependent(e, "crosshair_enabled", 1, 2);
        me.TR(me);
                me.TDempty(me, 0.1);
-               me.TD(me, 1, 2.9, e = makeXonoticCheckBox(0, "crosshair_hittest_blur_wall", _("Blur crosshair if the shot is obstructed")));
+               me.TD(me, 1, 2.9, e = makeXonoticCheckBox(0, "crosshair_hittest_blur_wall", _("Blur if obstructed by an obstacle")));
                        setDependentAND(e, "crosshair_hittest", 1, 100, "crosshair_enabled", 1, 2);
        me.TR(me);
                me.TDempty(me, 0.1);
-               me.TD(me, 1, 2.9, e = makeXonoticCheckBoxEx(1.25, 0, "crosshair_hittest_scale", _("Enlarge crosshair if targeting an enemy")));
+               me.TD(me, 1, 2.9, e = makeXonoticCheckBox(0, "crosshair_hittest_blur_teammate", _("Blur if obstructed by a teammate")));
                        setDependentAND(e, "crosshair_hittest", 1, 100, "crosshair_enabled", 1, 2);
+       me.TR(me);
+               me.TDempty(me, 0.1);
+               me.TD(me, 1, 2.9, e = makeXonoticCheckBoxEx(1.25, 1, "crosshair_hittest", _("Shrink if obstructed by a teammate")));
+                       setDependentAND(e, "crosshair_enabled", 1, 2, "crosshair_hittest", 1, 100);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(0.5, 0, "crosshair_hitindication", _("Animate crosshair when hitting an enemy")));
                        setDependent(e, "crosshair_enabled", 1, 2);