From: MirceaKitsune Date: Thu, 17 Nov 2011 19:55:48 +0000 (+0200) Subject: Use floor() for ammo on weapon screens. Fixes ammo showing extra zeros when not a... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6c8ca2a646f45d13b56ea465d4049c9ae2af9e0f;p=voretournament%2Fvoretournament.git Use floor() for ammo on weapon screens. Fixes ammo showing extra zeros when not a whole number --- diff --git a/data/qcsrc/server/cl_weaponsystem.qc b/data/qcsrc/server/cl_weaponsystem.qc index 3ba9de44..66edbb26 100644 --- a/data/qcsrc/server/cl_weaponsystem.qc +++ b/data/qcsrc/server/cl_weaponsystem.qc @@ -1625,13 +1625,13 @@ void W_DisplayDigitThink() self.skin = 11; // unavailable digit else { - txt = ftos(self.owner.weapon_load[self.owner.switchweapon]); + txt = ftos(floor(self.owner.weapon_load[self.owner.switchweapon])); txt = substring(txt, self.cnt - 1, 1); } } else // ammo display { - txt = ftos(self.owner.(self.owner.current_ammo)); + txt = ftos(floor(self.owner.(self.owner.current_ammo))); txt = substring(txt, self.cnt - 1, 1); }