From: MirceaKitsune Date: Thu, 17 Nov 2011 17:31:07 +0000 (+0200) Subject: Show the minus symbol while the weapon is being reloaded, or reloading is disabled... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1c8dd8456c57e53611e734b0b23420ec1bfe99b9;p=voretournament%2Fvoretournament.git Show the minus symbol while the weapon is being reloaded, or reloading is disabled for the Grabber --- 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);