From: Mario Date: Sun, 12 Jan 2020 14:19:28 +0000 (+1000) Subject: Make crosshair_chase_playeralpha a cvar X-Git-Tag: xonotic-v0.8.5~1105^2~22 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b60eee2141fab95ddb368f34945af46892162d47;p=xonotic%2Fxonotic-data.pk3dir.git Make crosshair_chase_playeralpha a cvar --- diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 5793cd5a7..1ed785f9f 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -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; diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index a2876e5f7..22618d643 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -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; }