From: FruitieX Date: Sat, 6 Nov 2010 14:25:15 +0000 (+0200) Subject: remove unused variable, set the movingavg nexcharge to = nexcharge if it's 0 (should... X-Git-Tag: xonotic-v0.1.0preview~183^2~10 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=be9cce5a55a4e8135e1869c8f33b8622edd6ad36;p=xonotic%2Fxonotic-data.pk3dir.git remove unused variable, set the movingavg nexcharge to = nexcharge if it's 0 (should only happen right after a game started) --- diff --git a/qcsrc/client/Defs.qc b/qcsrc/client/Defs.qc index 0d822e164..959d593a3 100644 --- a/qcsrc/client/Defs.qc +++ b/qcsrc/client/Defs.qc @@ -267,3 +267,5 @@ float bgmtime; string weaponorder_byimpulse; string weaponorder_bypriority; + +float nex_charge_movingavg; diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 211bb9e98..235b3aedf 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -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) {