]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 0d822e1642777a5c6e586394b8f4e99cfa61d26e..959d593a393e49170882a4863a9e6b7ac7134ce9 100644 (file)
@@ -267,3 +267,5 @@ float bgmtime;
 
 string weaponorder_byimpulse;
 string weaponorder_bypriority;
+
+float nex_charge_movingavg;
index 211bb9e9864586ed08aa23d07621a82aa6331603..235b3aedf0a2eab8b1353e031756e07cc25a4334 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)
                        {