From 1c8dd8456c57e53611e734b0b23420ec1bfe99b9 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Thu, 17 Nov 2011 19:31:07 +0200 Subject: [PATCH] Show the minus symbol while the weapon is being reloaded, or reloading is disabled for the Grabber --- data/qcsrc/server/cl_weaponsystem.qc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/data/qcsrc/server/cl_weaponsystem.qc b/data/qcsrc/server/cl_weaponsystem.qc index 2781dea0..015fb264 100644 --- a/data/qcsrc/server/cl_weaponsystem.qc +++ b/data/qcsrc/server/cl_weaponsystem.qc @@ -1591,7 +1591,7 @@ void W_DisplayDigitThink() } entity gun; - if(self.wait) // exterior weapon + if(self.dmg) // exterior weapon { // keep the digit attached to the same bone as the gun setattachment(self, self.owner, "bip01 r hand"); @@ -1621,9 +1621,14 @@ void W_DisplayDigitThink() string txt; if(self.team) // weapon load display { - txt = ftos(self.owner.weapon_load[self.owner.switchweapon]); - txt = substring(txt, self.cnt - 1, 1); - self.skin = stof(txt); // if it's not a float it becomes 0 + if(self.owner.weapon_load[self.owner.switchweapon] <= 0) + self.skin = 10; // unavailable + else + { + txt = ftos(self.owner.weapon_load[self.owner.switchweapon]); + txt = substring(txt, self.cnt - 1, 1); + self.skin = stof(txt); + } } self.nextthink = time; @@ -1635,7 +1640,7 @@ void W_DisplayDigitSetup(entity own, float num, float load, float exterior) digit = spawn(); digit.owner = own; digit.weapon = own.switchweapon; - digit.wait = exterior; + digit.dmg = exterior; digit.team = load; digit.cnt = num; e = get_weaponinfo(digit.weapon); -- 2.39.2