remove unused variable, set the movingavg nexcharge to = nexcharge if it's 0 (should...
authorFruitieX <fruitiex@gmail.com>
Sat, 6 Nov 2010 14:25:15 +0000 (16:25 +0200)
committerFruitieX <fruitiex@gmail.com>
Sat, 6 Nov 2010 14:25:15 +0000 (16:25 +0200)
qcsrc/client/Defs.qc
qcsrc/client/View.qc

index 0d822e1..959d593 100644 (file)
@@ -267,3 +267,5 @@ float bgmtime;
 
 string weaponorder_byimpulse;
 string weaponorder_bypriority;
+
+float nex_charge_movingavg;
index 211bb9e..235b3ae 100644 (file)
@@ -350,7 +350,6 @@ vector freeze_pmove_org, freeze_input_angles;
 entity nightvision_noise, nightvision_noise2;
 
 float pickup_crosshair_time, pickup_crosshair_size;
-float nex_charge_movingavg, nex_charge_current_avg;
 
 void CSQC_UpdateView(float w, float h)
 {
@@ -859,6 +858,9 @@ void CSQC_UpdateView(float w, float h)
                        float nex_charge;
                        nex_charge = getstatf(STAT_NEX_CHARGE);
 
+                       if(nex_charge_movingavg == 0) // this should only happen if we have just loaded up the game
+                               nex_charge_movingavg = nex_charge;
+
                        // ring around crosshair representing bullets left in camping rifle clip
                        if (activeweapon == WEP_CAMPINGRIFLE && cr_maxbullets)
                        {