From aa46aed96fe3c2aee49126d80139aeb2d98f846e Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 9 Oct 2015 15:40:18 +0200 Subject: [PATCH] Draw vehicle crosshair from within the main crosshair code so it now respects crosshair_enabled cvar and other checks --- qcsrc/client/view.qc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index d8f1ed1328..187356894d 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -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(); } -- 2.39.2