]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a small mathematical issue
authorterencehill <piuntn@gmail.com>
Fri, 19 Jun 2015 20:32:49 +0000 (22:32 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 19 Jun 2015 20:32:49 +0000 (22:32 +0200)
qcsrc/client/hud.qc

index 6f23e1d7faefddf92bae0c0a48de1cd872de765e..2f828e27f4de2c6d61963db98bb6a5401ebcb641 100644 (file)
@@ -4142,7 +4142,7 @@ void HUD_Physics(void)
 
                f = acceleration/autocvar_hud_panel_physics_acceleration_max;
                if (autocvar_hud_panel_physics_acceleration_progressbar_nonlinear)
-                       f = sqrt(f);
+                       f = (f >= 0 ? sqrt(f) : -sqrt(-f));
 
                if (acceleration_progressbar_scale) // allow progressbar to go out of panel bounds
                {