Properly skip reloading when there's no ammo left
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Jul 2011 11:35:25 +0000 (14:35 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 16 Jul 2011 11:35:25 +0000 (14:35 +0300)
data/qcsrc/server/cl_weaponsystem.qc

index a7bfd3b..4325474 100644 (file)
@@ -1664,7 +1664,7 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri
        if (self.clip_load >= self.reload_ammo_amount)\r
                return;\r
        // no ammo, so nothing to load\r
        if (self.clip_load >= self.reload_ammo_amount)\r
                return;\r
        // no ammo, so nothing to load\r
-       if(!self.(self.current_ammo) && self.reload_ammo_min)\r
+       if(self.(self.current_ammo) < 1 && self.reload_ammo_min)\r
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)\r
        {\r
                if(clienttype(self) == CLIENTTYPE_REAL && self.reload_complain < time)\r
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)\r
        {\r
                if(clienttype(self) == CLIENTTYPE_REAL && self.reload_complain < time)\r