]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/View.qc
add a slow rot to 50% nex charge (even when not holding the gun), improve the current...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / View.qc
index 510384c1d40541f67137b883dbfbc4809461ada1..211bb9e9864586ed08aa23d07621a82aa6331603 100644 (file)
@@ -350,7 +350,7 @@ vector freeze_pmove_org, freeze_input_angles;
 entity nightvision_noise, nightvision_noise2;
 
 float pickup_crosshair_time, pickup_crosshair_size;
-float nex_charge_change, nex_charge_current_avg;
+float nex_charge_movingavg, nex_charge_current_avg;
 
 void CSQC_UpdateView(float w, float h)
 {
@@ -873,11 +873,10 @@ void CSQC_UpdateView(float w, float h)
                                vector rgb;
                                // indicate how much we're charging right now with an inner circle
                                a = cvar("crosshair_nexvelocity_currentcharge_alpha");
-                               nex_charge_change = (1 - cvar("crosshair_nexvelocity_currentcharge_rate")) * nex_charge_change + cvar("crosshair_nexvelocity_currentcharge_rate") * nex_charge;
-                               nex_charge_current_avg = cvar("crosshair_nexvelocity_currentcharge_rate") * nex_charge_current_avg + (1 - cvar("crosshair_nexvelocity_currentcharge_rate")) * nex_charge_change;
+                               nex_charge_movingavg = (1 - cvar("crosshair_nexvelocity_currentcharge_movingavg_rate")) * nex_charge_movingavg + cvar("crosshair_nexvelocity_currentcharge_movingavg_rate") * nex_charge;
 
                                rgb = eX * cvar("crosshair_nexvelocity_currentcharge_color_red") + eY * cvar("crosshair_nexvelocity_currentcharge_color_green") + eZ * cvar("crosshair_nexvelocity_currentcharge_color_blue");
-                               DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, cvar("crosshair_nexvelocity_scale") * (nex_charge - nex_charge_current_avg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+                               DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, cvar("crosshair_nexvelocity_currentcharge_scale") * (nex_charge - nex_charge_movingavg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
 
                                // draw the charge
                                a = cvar("crosshair_nexvelocity_alpha");