]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/physics.qc
Use pow() for accelerometer (potential fix for inconsistent behaviour)
[xonotic/xonotic-data.pk3dir.git] / 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;