]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/View.qc
don't run any of the nex-ring stuff if nexspeed <= minspeed
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / View.qc
index 5ee028d46b629b8608eb0778a5c3143d370136a9..5f422a03eb0a4b3db660a7ce8b6e13b66ee8acbf 100644 (file)
@@ -836,7 +836,10 @@ void CSQC_UpdateView(float w, float h)
                                if(xyspeed > nex_speed)
                                        nex_speed = min(xyspeed, nex_maxvelocity);
                                else
-                                       nex_speed = (1 - nex_speed_falloff_factor) * nex_speed;
+                                       nex_speed = max(nex_minvelocity, nex_speed - nex_speed_falloff_rate * frametime);
+
+                               if (activeweapon == WEP_NEX && button_attack2 && nex_charge && getstati(GetAmmoStat(3)))
+                                       nex_speed = min(nex_maxvelocity, nex_speed + nex_charge_rate * frametime);
 
                                // ring around crosshair representing bullets left in camping rifle clip
                                if (activeweapon == WEP_CAMPINGRIFLE && cr_maxbullets)
@@ -847,7 +850,7 @@ void CSQC_UpdateView(float w, float h)
                                        a = cvar("crosshair_campingrifle_bulletcounter_alpha");
                                        DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
                                }
-                               else if (activeweapon == WEP_NEX) // ring around crosshair representing velocity-dependent damage for the nex
+                               else if (activeweapon == WEP_NEX && nex_velocitydependent && nex_speed > nex_minvelocity) // ring around crosshair representing velocity-dependent damage for the nex
                                {
                                        f = bound(0, (nex_speed - nex_minvelocity) / (nex_maxvelocity - nex_minvelocity), 1);