From 4d34e6c618fbafeff3158f55e7407f0dea5d8846 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 21 Nov 2020 10:04:38 +0100 Subject: [PATCH] Fix messy crosshair_hittest settings in the menu: * 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 | 1 - qcsrc/client/hud/crosshair.qh | 1 - .../xonotic/dialog_settings_game_crosshair.qc | 17 +++++++---------- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/crosshairs.cfg b/crosshairs.cfg index db31159a5..2c040259b 100644 --- a/crosshairs.cfg +++ b/crosshairs.cfg @@ -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 diff --git a/qcsrc/client/hud/crosshair.qh b/qcsrc/client/hud/crosshair.qh index ab725957a..4cd7715af 100644 --- a/qcsrc/client/hud/crosshair.qh +++ b/qcsrc/client/hud/crosshair.qh @@ -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; diff --git a/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc b/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc index 28a0f57a4..89e376e08 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc @@ -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); -- 2.39.2