]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't display a negative 0 as acceleration value in the physics panel, make it positi...
authorterencehill <piuntn@gmail.com>
Mon, 20 Nov 2017 15:50:46 +0000 (16:50 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 20 Nov 2017 15:50:46 +0000 (16:50 +0100)
qcsrc/client/hud/panel/physics.qc

index e1fffb59f34e52684ee1ac0ec2191322e61e8c59..a6c65183d4541cc0cb23c1cdf133e594fc3c1e0c 100644 (file)
@@ -88,10 +88,10 @@ void HUD_Physics()
        const int acc_decimals = 2;
        if(time > physics_update_time)
        {
+               discrete_acceleration = acceleration;
                // workaround for ftos_decimals returning a negative 0
                if(discrete_acceleration > -1 / (10 ** acc_decimals) && discrete_acceleration < 0)
                        discrete_acceleration = 0;
-               discrete_acceleration = acceleration;
                discrete_speed = speed;
                physics_update_time += autocvar_hud_panel_physics_update_interval;
                if(physics_update_time < time)