]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Fix crosshair blur not working well while aiming at a teammate and moving crosshair
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index 850217f152c1b8013399873762a5d4a0f3484fe6..49b0d26d2765343eb7e917722a37906f70078a8f 100644 (file)
@@ -672,7 +672,10 @@ float TrueAimCheck(entity wepent)
        tracebox(w_shotorg, mi, ma, w_shotorg + view_forward * (vecs.x + nudge), MOVE_NORMAL, ta); // FIXME this MOVE_NORMAL part will misbehave a little in csqc
        w_shotorg = trace_endpos - view_forward * nudge;
 
-       tracebox(w_shotorg, mi, ma, trueaimpoint, MOVE_NORMAL, ta);
+       if (mi == '0 0 0')
+               traceline(w_shotorg, trueaimpoint, MOVE_NORMAL, ta);
+       else
+               tracebox(w_shotorg, mi, ma, trueaimpoint, MOVE_NORMAL, ta);
        shottype = EnemyHitCheck();
        if(shottype != SHOTTYPE_HITWORLD)
                return shottype;
@@ -1124,7 +1127,7 @@ void HUD_Crosshair(entity this)
                wcross_alpha_goal_prev = wcross_alpha;
                wcross_color_goal_prev = wcross_color;
 
-               if(spectatee_status == -1 && shottype == SHOTTYPE_HITTEAM || (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)))
                {
                        wcross_blur = 1;
                        wcross_alpha *= 0.75;