]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Fix the - symbol not showing for weapon load digits while reloading. This fixes all...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 17 Nov 2011 20:03:20 +0000 (22:03 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 17 Nov 2011 20:03:20 +0000 (22:03 +0200)
data/qcsrc/server/cl_weaponsystem.qc

index 66edbb26370967edc70dfefe55024ce552fcc064..b16a5efb3dca21c9e3748a2c86b3951e1e81aea6 100644 (file)
@@ -1581,6 +1581,8 @@ void W_SetupProjectileVelocity(entity missile, float pSpeed, float spread)
 \r
 void W_DisplayDigitThink()\r
 {\r
+       self.nextthink = time;\r
+\r
        // the owner has switched to another weapon, remove the digits\r
        if(self.weapon != self.owner.switchweapon)\r
        {\r
@@ -1622,7 +1624,10 @@ void W_DisplayDigitThink()
        if(self.team) // weapon load display\r
        {\r
                if(self.owner.weapon_load[self.owner.switchweapon] <= 0)\r
+               {\r
                        self.skin = 11; // unavailable digit\r
+                       return;\r
+               }\r
                else\r
                {\r
                        txt = ftos(floor(self.owner.weapon_load[self.owner.switchweapon]));\r
@@ -1635,12 +1640,10 @@ void W_DisplayDigitThink()
                txt = substring(txt, self.cnt - 1, 1);\r
        }\r
 \r
-       if(!txt || txt == "")\r
+       if((!txt || txt == ""))\r
                self.skin = 10; // empty digit\r
        else\r
                self.skin = stof(txt);\r
-\r
-       self.nextthink = time;\r
 }\r
 \r
 void W_DisplayDigitSetup(entity own, float num, float load, float exterior)\r