]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix arc not switching weapons properly when out of ammo
authorMario <mario@smbclan.net>
Sat, 4 Mar 2017 18:31:03 +0000 (04:31 +1000)
committerMario <mario@smbclan.net>
Sat, 4 Mar 2017 18:31:03 +0000 (04:31 +1000)
qcsrc/common/weapons/weapon/arc.qc

index fb3eb0b76a343a2b9d707c3e0a9688e38df1c1b5..7e77d34709db43a8332847accc46447dde3e3ab8 100644 (file)
@@ -382,8 +382,9 @@ void W_Arc_Beam_Think(entity this)
                if(this == own.(weaponentity).arc_beam) { own.(weaponentity).arc_beam = NULL; }
                if(!thiswep.wr_checkammo1(thiswep, own, weaponentity) && !(own.items & IT_UNLIMITED_WEAPON_AMMO))
                {
-                       W_SwitchWeapon_Force(own, w_getbestweapon(own, weaponentity), weaponentity);
-                       w_ready(thiswep, own, weaponentity, 1);
+                       // note: this doesn't force the switch
+                       W_SwitchToOtherWeapon(own, weaponentity);
+                       own.(weaponentity).arc_BUTTON_ATCK_prev = false; // hax
                }
                delete(this);
                return;