From 4aa5976b1e3827abfa15f956e1b0f76d2bbff2bb Mon Sep 17 00:00:00 2001 From: David Knapp Date: Thu, 4 Jul 2019 04:07:15 -0400 Subject: [PATCH] Check misc_bulletcounter == 0 before reloading machine gun to let burst finish --- qcsrc/common/weapons/weapon/machinegun.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/common/weapons/weapon/machinegun.qc b/qcsrc/common/weapons/weapon/machinegun.qc index 6679f2135..ea96a8f59 100644 --- a/qcsrc/common/weapons/weapon/machinegun.qc +++ b/qcsrc/common/weapons/weapon/machinegun.qc @@ -199,7 +199,7 @@ METHOD(MachineGun, wr_aim, void(entity thiswep, entity actor, .entity weaponenti } METHOD(MachineGun, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) { - if(WEP_CVAR(machinegun, reload_ammo) && actor.(weaponentity).clip_load < min(max(WEP_CVAR(machinegun, sustained_ammo), WEP_CVAR(machinegun, first_ammo)), WEP_CVAR(machinegun, burst_ammo))) { // forced reload + if(WEP_CVAR(machinegun, reload_ammo) && actor.(weaponentity).clip_load < min(max(WEP_CVAR(machinegun, sustained_ammo), WEP_CVAR(machinegun, first_ammo)), WEP_CVAR(machinegun, burst_ammo)) && actor.(weaponentity).misc_bulletcounter >= 0) { // forced reload - wait until the bulletcounter is 0 so a burst loop can finish thiswep.wr_reload(thiswep, actor, weaponentity); } else if(WEP_CVAR(machinegun, mode) == 1) -- 2.39.2