From 6c8ca2a646f45d13b56ea465d4049c9ae2af9e0f Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Thu, 17 Nov 2011 21:55:48 +0200 Subject: [PATCH] Use floor() for ammo on weapon screens. Fixes ammo showing extra zeros when not a whole number --- data/qcsrc/server/cl_weaponsystem.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.39.2