From: MirceaKitsune Date: Thu, 17 Nov 2011 20:03:20 +0000 (+0200) Subject: Fix the - symbol not showing for weapon load digits while reloading. This fixes all... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4489967f20757af2c161b064ee36f00b31b8e6e7;p=voretournament%2Fvoretournament.git Fix the - symbol not showing for weapon load digits while reloading. This fixes all known Grabber display bugs --- diff --git a/data/qcsrc/server/cl_weaponsystem.qc b/data/qcsrc/server/cl_weaponsystem.qc index 66edbb26..b16a5efb 100644 --- a/data/qcsrc/server/cl_weaponsystem.qc +++ b/data/qcsrc/server/cl_weaponsystem.qc @@ -1581,6 +1581,8 @@ void W_SetupProjectileVelocity(entity missile, float pSpeed, float spread) void W_DisplayDigitThink() { + self.nextthink = time; + // the owner has switched to another weapon, remove the digits if(self.weapon != self.owner.switchweapon) { @@ -1622,7 +1624,10 @@ void W_DisplayDigitThink() if(self.team) // weapon load display { if(self.owner.weapon_load[self.owner.switchweapon] <= 0) + { self.skin = 11; // unavailable digit + return; + } else { txt = ftos(floor(self.owner.weapon_load[self.owner.switchweapon])); @@ -1635,12 +1640,10 @@ void W_DisplayDigitThink() txt = substring(txt, self.cnt - 1, 1); } - if(!txt || txt == "") + if((!txt || txt == "")) self.skin = 10; // empty digit else self.skin = stof(txt); - - self.nextthink = time; } void W_DisplayDigitSetup(entity own, float num, float load, float exterior)