]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
merge master and add hittest_blue_teammate martin-t/precedence
authorMartin Taibr <taibr.martin@gmail.com>
Sun, 27 Oct 2019 14:23:40 +0000 (15:23 +0100)
committerMartin Taibr <taibr.martin@gmail.com>
Sun, 27 Oct 2019 14:23:40 +0000 (15:23 +0100)
1  2 
crosshairs.cfg
qcsrc/client/autocvars.qh
qcsrc/client/view.qc
qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc
qcsrc/server/bot/default/havocbot/havocbot.qc

diff --cc crosshairs.cfg
index 47631f0fa6cb70b4a664e493ff5dd06bd300bfae,47631f0fa6cb70b4a664e493ff5dd06bd300bfae..148ee9e0a193a7e48e2184efa12cafe7c021707e
@@@ -33,7 -33,7 +33,8 @@@ seta crosshair_hitindication_speed 
  // 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, _scale, and _showipact 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"
  
index d11355659aa8071a5795e030b555a01361aeeb8b,d11355659aa8071a5795e030b555a01361aeeb8b..ae82406a562450f2c207b17f7352686aaf29d234
@@@ -121,7 -121,7 +121,8 @@@ string autocvar_crosshair_hitindication
  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 71b45b9057d1ff705fe50c5320c062a12e85d3d0,4b8bc4899a788de78152dec7a1990b56a1de01c0..b421eabfb6f87ab1272edc992a9b36a80a4d592b
@@@ -1124,7 -1127,7 +1127,8 @@@ void HUD_Crosshair(entity this
                wcross_alpha_goal_prev = wcross_alpha;
                wcross_color_goal_prev = wcross_color;
  
-               if(shottype == SHOTTYPE_HITOBSTRUCTION && autocvar_crosshair_hittest_blur && !autocvar_chase_active)
 -              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,2d30dc2448140784408a48f4ed4469a2f6622db8..28a0f57a4b747a604f74157419fd5aa051f5623f
@@@ -133,7 -133,7 +133,7 @@@ void XonoticGameCrosshairSettingsTab_fi
                        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);