From 875918d5732859d78cc46e6beef66347c43e8c33 Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 20 Nov 2017 16:50:46 +0100 Subject: [PATCH] Don't display a negative 0 as acceleration value in the physics panel, make it positive (existing workaround was broken) --- qcsrc/client/hud/panel/physics.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/client/hud/panel/physics.qc b/qcsrc/client/hud/panel/physics.qc index e1fffb59f..a6c65183d 100644 --- a/qcsrc/client/hud/panel/physics.qc +++ b/qcsrc/client/hud/panel/physics.qc @@ -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) -- 2.39.2