]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Disable crosshair (and crosshair_chase) if chase_front is enabled
authorterencehill <piuntn@gmail.com>
Thu, 10 Dec 2020 13:45:33 +0000 (14:45 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 10 Dec 2020 13:45:33 +0000 (14:45 +0100)
qcsrc/client/hud/crosshair.qc
qcsrc/client/view.qh
qcsrc/lib/csqcmodel/cl_player.qc

index d16e06fb65a513e0647a4cc5777358c12963cc76..3af4d570e40335cbe532e950adc0955ac8b89e9c 100644 (file)
@@ -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
index cc3424edd6dde0faa0990559664db0ac6ccc5627..0abcb13fe8d0a7e78708fe478711ff46f662db23 100644 (file)
@@ -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;
index acd503c5a222672078d0dd5d23f6c48126081c6c..af19a9d4a6dffcb811d5135dd702b4c332304fa6 100644 (file)
@@ -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;