From: Rudolf Polzer Date: Sun, 4 Sep 2011 16:41:37 +0000 (+0200) Subject: show crosshair for the ACTIVE, not SWITCHING-TO weapon X-Git-Tag: xonotic-v0.5.0~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=21a851236faf28428b67107bf2a66c7f2914b3a1;p=xonotic%2Fxonotic-data.pk3dir.git show crosshair for the ACTIVE, not SWITCHING-TO weapon --- 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;