From: Mario Date: Thu, 18 May 2017 01:36:30 +0000 (+1000) Subject: Use pow() for accelerometer (potential fix for inconsistent behaviour) X-Git-Tag: xonotic-v0.8.5~2776 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8f213738cdc074faa624a74d1aa2257e6d19fa6b;p=xonotic%2Fxonotic-data.pk3dir.git Use pow() for accelerometer (potential fix for inconsistent behaviour) --- diff --git a/qcsrc/client/hud/panel/physics.qc b/qcsrc/client/hud/panel/physics.qc index 42f6512c0..6befd1a30 100644 --- a/qcsrc/client/hud/panel/physics.qc +++ b/qcsrc/client/hud/panel/physics.qc @@ -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;