]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use pow() for accelerometer (potential fix for inconsistent behaviour)
authorMario <mario@smbclan.net>
Thu, 18 May 2017 01:36:30 +0000 (11:36 +1000)
committerMario <mario@smbclan.net>
Thu, 18 May 2017 01:36:30 +0000 (11:36 +1000)
qcsrc/client/hud/panel/physics.qc

index 42f6512c0fc22bfa2d270c6fbdf6aa7e59bebf15..6befd1a30a4fe161ea57e386def9eb33f0e2bbfe 100644 (file)
@@ -86,7 +86,7 @@ void HUD_Physics()
        if(time > physics_update_time)
        {
                // workaround for ftos_decimals returning a negative 0
-               if(discrete_acceleration > -1 / (10 ** acc_decimals) && discrete_acceleration < 0)
+               if(discrete_acceleration > -1 / pow(10, acc_decimals) && discrete_acceleration < 0)
                        discrete_acceleration = 0;
                discrete_acceleration = acceleration;
                discrete_speed = speed;