From: Mario Date: Thu, 27 Nov 2014 06:11:52 +0000 (+1100) Subject: Check if melee is enabled when checking ammo X-Git-Tag: xonotic-v0.8.0~122^2~25 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d8ea53f72e4437125b780661b88a8a7a02d41bf0;p=xonotic%2Fxonotic-data.pk3dir.git Check if melee is enabled when checking ammo --- diff --git a/qcsrc/common/weapons/w_shotgun.qc b/qcsrc/common/weapons/w_shotgun.qc index 9e87f8c85..88c604c0a 100644 --- a/qcsrc/common/weapons/w_shotgun.qc +++ b/qcsrc/common/weapons/w_shotgun.qc @@ -265,8 +265,9 @@ float W_Shotgun(float req) } case WR_CHECKAMMO2: { - // melee does not use ammo - return TRUE; + if(WEP_CVAR(shotgun, secondary)) + return TRUE; // melee does not use ammo + return FALSE; // secondary unavailable } case WR_CONFIG: {