From c9cbe64c334fbed4d1f1282378b8ea8cfe9dd8d8 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 27 Nov 2014 16:53:08 +1100 Subject: [PATCH] Fix infinite shotgun ammo --- qcsrc/common/weapons/w_shotgun.qc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/weapons/w_shotgun.qc b/qcsrc/common/weapons/w_shotgun.qc index 532d563a6..973809bd0 100644 --- a/qcsrc/common/weapons/w_shotgun.qc +++ b/qcsrc/common/weapons/w_shotgun.qc @@ -193,6 +193,7 @@ void W_Shotgun_Attack2(void) float W_Shotgun(float req) { + float ammo_amount; switch(req) { case WR_AIM: @@ -256,9 +257,14 @@ float W_Shotgun(float req) return TRUE; } case WR_CHECKAMMO1: + { + ammo_amount = self.WEP_AMMO(SHOTGUN) >= WEP_CVAR_PRI(shotgun, ammo); + ammo_amount += self.(weapon_load[WEP_SHOTGUN]) >= WEP_CVAR_PRI(shotgun, ammo); + return ammo_amount; + } case WR_CHECKAMMO2: { - // shotgun has infinite ammo + // melee has infinite ammo return TRUE; } case WR_CONFIG: -- 2.39.2