]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Draw vehicle crosshair from within the main crosshair code so it now respects crossha...
authorterencehill <piuntn@gmail.com>
Fri, 9 Oct 2015 13:40:18 +0000 (15:40 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 9 Oct 2015 13:40:18 +0000 (15:40 +0200)
qcsrc/client/view.qc

index d8f1ed1328c2344b9e39c6aff089c21c4991fa10..187356894d970f19a53aba299f79f558d77888e6 100644 (file)
@@ -457,9 +457,6 @@ bool WantEventchase()
 
 void HUD_Crosshair_Vehicle()
 {
-       if(!hud || intermission)
-               return;
-
        if(hud != HUD_BUMBLEBEE_GUN)
        {
                Vehicle info = get_vehicleinfo(hud);
@@ -551,12 +548,18 @@ void HUD_Crosshair()
        float f, i, j;
        vector v;
        if(!scoreboard_active && !camera_active && intermission != 2 &&
-               spectatee_status != -1 && hud == HUD_NORMAL && !csqcplayer.viewloc &&
+               spectatee_status != -1 && !csqcplayer.viewloc &&
                !HUD_MinigameMenu_IsOpened() )
        {
                if (!autocvar_crosshair_enabled) // main toggle for crosshair rendering
                        return;
 
+               if (hud != HUD_NORMAL)
+               {
+                       HUD_Crosshair_Vehicle();
+                       return;
+               }
+
                string wcross_style;
                float wcross_alpha, wcross_resolution;
                wcross_style = autocvar_crosshair;
@@ -1030,7 +1033,6 @@ void HUD_Draw()
        // crosshair goes VERY LAST
        UpdateDamage();
        HUD_Crosshair();
-       HUD_Crosshair_Vehicle();
        HitSound();
 }