From: Mario Date: Sat, 4 Mar 2017 18:31:03 +0000 (+1000) Subject: Fix arc not switching weapons properly when out of ammo X-Git-Tag: xonotic-v0.8.2~134 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a6fafb0894648e10f424a7f071f47996e2b28474;p=xonotic%2Fxonotic-data.pk3dir.git Fix arc not switching weapons properly when out of ammo --- diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index fb3eb0b76..7e77d3470 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -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;