From: terencehill Date: Thu, 10 Dec 2020 13:45:33 +0000 (+0100) Subject: Disable crosshair (and crosshair_chase) if chase_front is enabled X-Git-Tag: xonotic-v0.8.5~644 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8844a12cec724aec0953481fad0632c55d391e58;p=xonotic%2Fxonotic-data.pk3dir.git Disable crosshair (and crosshair_chase) if chase_front is enabled --- diff --git a/qcsrc/client/hud/crosshair.qc b/qcsrc/client/hud/crosshair.qc index d16e06fb6..3af4d570e 100644 --- a/qcsrc/client/hud/crosshair.qc +++ b/qcsrc/client/hud/crosshair.qc @@ -218,6 +218,12 @@ void HUD_Crosshair(entity this) if(autocvar_chase_active > 0 && autocvar_crosshair_chase && STAT(HEALTH) <= 0 && csqcplayer) csqcplayer.alpha = csqcplayer.m_alpha; + if (autocvar_chase_active > 0 && autocvar_chase_front) + { + csqcplayer.alpha = csqcplayer.m_alpha; + return; + } + float f, i, j; vector v; if(!scoreboard_active && !camera_active && intermission != 2 && !STAT(GAME_STOPPED) && !autocvar_cl_lockview diff --git a/qcsrc/client/view.qh b/qcsrc/client/view.qh index cc3424edd..0abcb13fe 100644 --- a/qcsrc/client/view.qh +++ b/qcsrc/client/view.qh @@ -15,6 +15,7 @@ float autocvar_camera_speed_chase; float autocvar_camera_speed_free; float autocvar_camera_speed_roll; int autocvar_chase_active; +bool autocvar_chase_front; int autocvar_cl_gentle_damage; bool autocvar_cl_lockview; bool autocvar_cl_orthoview; diff --git a/qcsrc/lib/csqcmodel/cl_player.qc b/qcsrc/lib/csqcmodel/cl_player.qc index acd503c5a..af19a9d4a 100644 --- a/qcsrc/lib/csqcmodel/cl_player.qc +++ b/qcsrc/lib/csqcmodel/cl_player.qc @@ -434,7 +434,6 @@ float autocvar_chase_back; float autocvar_chase_up; bool autocvar_chase_overhead; float autocvar_chase_pitchangle; -bool autocvar_chase_front; vector CSQCPlayer_ApplyChase(entity this, vector v) { vector forward;