Hopefully fix a bug causing ammo to get to negative values sometimes
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 11 Jul 2011 12:54:33 +0000 (15:54 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 11 Jul 2011 12:54:33 +0000 (15:54 +0300)
data/qcsrc/server/cl_weaponsystem.qc

index f6ae23f..15e50eb 100644 (file)
@@ -1614,7 +1614,7 @@ void W_ReloadedAndReady()
                self.clip_load = self.reload_ammo_amount;\r
        else\r
        {\r
-               while(self.clip_load < self.reload_ammo_amount && self.(self.current_ammo)) // make sure we don't add more ammo than we have\r
+               while(self.clip_load < self.reload_ammo_amount && self.(self.current_ammo) >= 1) // make sure we don't add more ammo than we have\r
                {\r
                        self.clip_load += 1;\r
                        self.(self.current_ammo) -= 1;\r