From: MirceaKitsune Date: Mon, 11 Jul 2011 12:54:33 +0000 (+0300) Subject: Hopefully fix a bug causing ammo to get to negative values sometimes X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7f250886ce39b912b6d49c77ae19aa25b821bb70;p=voretournament%2Fvoretournament.git Hopefully fix a bug causing ammo to get to negative values sometimes --- diff --git a/data/qcsrc/server/cl_weaponsystem.qc b/data/qcsrc/server/cl_weaponsystem.qc index f6ae23fa..15e50eb4 100644 --- a/data/qcsrc/server/cl_weaponsystem.qc +++ b/data/qcsrc/server/cl_weaponsystem.qc @@ -1614,7 +1614,7 @@ void W_ReloadedAndReady() self.clip_load = self.reload_ammo_amount; else { - while(self.clip_load < self.reload_ammo_amount && self.(self.current_ammo)) // make sure we don't add more ammo than we have + while(self.clip_load < self.reload_ammo_amount && self.(self.current_ammo) >= 1) // make sure we don't add more ammo than we have { self.clip_load += 1; self.(self.current_ammo) -= 1;