]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove an unnecessary hack that allowed an infinite ammo glitch with the mine layer
authorMario <mario@smbclan.net>
Sat, 30 Apr 2016 07:55:24 +0000 (17:55 +1000)
committerMario <mario@smbclan.net>
Sat, 30 Apr 2016 07:55:24 +0000 (17:55 +1000)
qcsrc/common/weapons/weapon/minelayer.qc

index 9a02c850bbb88685170df7f2cb97fd97ddca7912..96d7555cda63b4cbf4f4ea540ca6504c4f6a5db6 100644 (file)
@@ -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))
 {