]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Crosshair blur: make playing and spectating a player behave the same, split the cross...
authorterencehill <piuntn@gmail.com>
Fri, 5 Jun 2020 16:59:51 +0000 (18:59 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 5 Jun 2020 16:59:51 +0000 (18:59 +0200)
crosshairs.cfg
qcsrc/client/autocvars.qh
qcsrc/client/view.qc
qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc

index dd3302d76c060fea5f973c10e5d5011721d1ac51..db31159a5e2b45e84d9b987a9696a8d1d674bec0 100644 (file)
@@ -33,7 +33,8 @@ seta crosshair_hitindication_speed 5
 // hit testing/tracing for special effects for the crosshair
 set g_trueaim_minrange 44 "TrueAim minimum range (TrueAim adjusts shots so they hit the crosshair point even though the gun is not at the screen center)"
 seta crosshair_hittest 1 "do a crosshair hit evaluation, applying effects from the _blur and _scale cvars"
-seta crosshair_hittest_blur 1 "blur the crosshair if the shot is obstructed"
+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!)"
 
index 7c6de40db847f90172dff997bbde5678d64f57b9..5c04cf5ea4a087a2a5cb2503ec5a798dca2ab555 100644 (file)
@@ -121,7 +121,8 @@ string autocvar_crosshair_hitindication_color;
 string autocvar_crosshair_hitindication_per_weapon_color;
 float autocvar_crosshair_hitindication_speed;
 bool autocvar_crosshair_hittest;
-bool autocvar_crosshair_hittest_blur;
+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;
index 1f8eb8a69466a1d44c8a1be6972068cdd73125eb..dc9995f91f9517add5d043dba9f62bf541c7b10c 100644 (file)
@@ -1231,7 +1231,8 @@ void HUD_Crosshair(entity this)
                wcross_alpha_goal_prev = wcross_alpha;
                wcross_color_goal_prev = wcross_color;
 
-               if(spectatee_status == 0 && (shottype == SHOTTYPE_HITTEAM || (shottype == SHOTTYPE_HITOBSTRUCTION && autocvar_crosshair_hittest_blur && !autocvar_chase_active)))
+               if((shottype == SHOTTYPE_HITTEAM && autocvar_crosshair_hittest_blur_teammate)
+                       || (shottype == SHOTTYPE_HITOBSTRUCTION && autocvar_crosshair_hittest_blur_wall && !autocvar_chase_active))
                {
                        wcross_blur = 1;
                        wcross_alpha *= 0.75;
index 2d30dc2448140784408a48f4ed4469a2f6622db8..28a0f57a4b747a604f74157419fd5aa051f5623f 100644 (file)
@@ -133,7 +133,7 @@ void XonoticGameCrosshairSettingsTab_fill(entity me)
                        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", _("Blur crosshair if the shot is obstructed")));
+               me.TD(me, 1, 2.9, e = makeXonoticCheckBox(0, "crosshair_hittest_blur_wall", _("Blur crosshair if the shot is obstructed")));
                        setDependentAND(e, "crosshair_hittest", 1, 100, "crosshair_enabled", 1, 2);
        me.TR(me);
                me.TDempty(me, 0.1);