From: Mario Date: Sat, 30 Apr 2016 07:55:24 +0000 (+1000) Subject: Remove an unnecessary hack that allowed an infinite ammo glitch with the mine layer X-Git-Tag: xonotic-v0.8.2~943 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=659dbd77c802522bdfd7a50aa9ae3dc13ba9bd36;p=xonotic%2Fxonotic-data.pk3dir.git Remove an unnecessary hack that allowed an infinite ammo glitch with the mine layer --- diff --git a/qcsrc/common/weapons/weapon/minelayer.qc b/qcsrc/common/weapons/weapon/minelayer.qc index 9a02c850b..96d7555cd 100644 --- a/qcsrc/common/weapons/weapon/minelayer.qc +++ b/qcsrc/common/weapons/weapon/minelayer.qc @@ -530,15 +530,15 @@ METHOD(MineLayer, wr_think, void(entity thiswep, entity actor, .entity weaponent METHOD(MineLayer, wr_checkammo1, bool(entity thiswep)) { SELFPARAM(); - int slot = 0; // TODO: unhardcode - // don't switch while placing a mine - if(ATTACK_FINISHED(self, slot) <= time || PS(self).m_weapon != WEP_MINE_LAYER) - { + //int slot = 0; // TODO: unhardcode + // actually do // don't switch while placing a mine + //if(ATTACK_FINISHED(self, slot) <= time || PS(self).m_weapon != WEP_MINE_LAYER) + //{ float ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(minelayer, ammo); ammo_amount += self.(weapon_load[WEP_MINE_LAYER.m_id]) >= WEP_CVAR(minelayer, ammo); return ammo_amount; - } - return true; + //} + //return true; } METHOD(MineLayer, wr_checkammo2, bool(entity thiswep)) {