]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
show crosshair for the ACTIVE, not SWITCHING-TO weapon
authorRudolf Polzer <divverent@xonotic.org>
Sun, 4 Sep 2011 16:41:37 +0000 (18:41 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 4 Sep 2011 16:41:37 +0000 (18:41 +0200)
qcsrc/client/View.qc
qcsrc/client/hud.qc
qcsrc/client/main.qh

index efe7be12f3d91cda379ea7750c6515fea707ad76..b4c222a7728cc44bed196550f4137f9aebcfec05 100644 (file)
@@ -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)
        {
index a1aae684f755e0aaa82f0ff5601d3f5fecbe1f11..88451ecce08e0506da463fc4af1fe845f5932ae8 100644 (file)
@@ -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
index 64399b20a3e035e6ad899978225cdfadb44a581d..91a5087d04c8b50fa3224f8691b4d855d2eddcf7 100644 (file)
@@ -117,6 +117,7 @@ float spectatorbutton_zoom;
 float button_attack2;
 
 float activeweapon;
+float activeswitchweapon;
 float current_viewzoom;
 float zoomin_effect;
 float warmup_stage;