]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make crosshair_chase_playeralpha a cvar
authorMario <mario.mario@y7mail.com>
Sun, 12 Jan 2020 14:19:28 +0000 (00:19 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 12 Jan 2020 14:19:28 +0000 (00:19 +1000)
qcsrc/client/autocvars.qh
qcsrc/client/view.qc

index 5793cd5a7b4de75d162cee50e7844438d59be4be..1ed785f9fe4248bd2266f17779b0b06f4d2136a7 100644 (file)
@@ -151,7 +151,7 @@ float autocvar_crosshair_ring_reload_alpha;
 float autocvar_crosshair_ring_reload_size;
 float autocvar_crosshair_size;
 bool autocvar_crosshair_chase = true;
-float crosshair_chase_playeralpha = 0.25;
+float autocvar_crosshair_chase_playeralpha = 0.25;
 int autocvar_ekg;
 float autocvar_fov;
 bool autocvar_hud_cursormode = true;
index a2876e5f70601b31427c7d1a19486075688c7cb2..22618d6431d61f1419d60eac34612a039f588565 100644 (file)
@@ -1120,12 +1120,12 @@ void HUD_Crosshair(entity this)
                else if(autocvar_chase_active > 0 && autocvar_crosshair_chase)
                {
                        vector player_org = ((csqcplayer) ? csqcplayer.origin + csqcplayer.view_ofs : view_origin);
-                       if(csqcplayer && crosshair_chase_playeralpha && crosshair_chase_playeralpha < 1)
+                       if(csqcplayer && autocvar_crosshair_chase_playeralpha && autocvar_crosshair_chase_playeralpha < 1)
                        {
                                traceline(view_origin, view_origin + max_shot_distance * view_forward, MOVE_NORMAL, NULL);
                                float myalpha = (!csqcplayer.m_alpha) ? 1 : csqcplayer.m_alpha;
                                if(trace_ent == csqcplayer && STAT(HEALTH) > 0)
-                                       csqcplayer.alpha = min(crosshair_chase_playeralpha, myalpha);
+                                       csqcplayer.alpha = min(autocvar_crosshair_chase_playeralpha, myalpha);
                                else
                                        csqcplayer.alpha = csqcplayer.m_alpha;
                        }