// 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"
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;
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;
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);