From 21a851236faf28428b67107bf2a66c7f2914b3a1 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 4 Sep 2011 18:41:37 +0200 Subject: [PATCH] show crosshair for the ACTIVE, not SWITCHING-TO weapon --- qcsrc/client/View.qc | 3 ++- qcsrc/client/hud.qc | 2 +- qcsrc/client/main.qh | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index efe7be12f..b4c222a77 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -544,7 +544,8 @@ void CSQC_UpdateView(float w, float h) } ColorTranslateMode = autocvar_cl_stripcolorcodes; - activeweapon = getstati(STAT_SWITCHWEAPON); + activeswitchweapon = getstati(STAT_SWITCHWEAPON); + activeweapon = getstati(STAT_WEAPON); f = (serverflags & SERVERFLAG_TEAMPLAY); if(f != teamplay) { diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index a1aae684f..88451ecce 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -641,7 +641,7 @@ void HUD_Weapons(void) weapid = self.impulse; // draw background behind currently selected weapon - if(self.weapon == activeweapon) + if(self.weapon == activeswitchweapon) drawpic_aspect_skin(wpnpos, "weapon_current_bg", wpnsize, '1 1 1', wpnalpha, DRAWFLAG_NORMAL); // draw the weapon accuracy diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index 64399b20a..91a5087d0 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -117,6 +117,7 @@ float spectatorbutton_zoom; float button_attack2; float activeweapon; +float activeswitchweapon; float current_viewzoom; float zoomin_effect; float warmup_stage; -- 2.39.2