]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Round speed diff
authorDes <xon@damianv.com.ar>
Sun, 29 Sep 2024 12:37:08 +0000 (09:37 -0300)
committerDes <xon@damianv.com.ar>
Fri, 29 Nov 2024 11:44:49 +0000 (08:44 -0300)
(cherry picked from commit 71696a5bc00e6397e01351deeab78fc6909ebef7)

qcsrc/client/hud/panel/racetimer.qc

index 915d21870622d387b3419353fb3b4505e4862a6b..50ea79a3a7bb73bb70c7599605816c1f357bd5ca 100644 (file)
@@ -225,7 +225,7 @@ void HUD_RaceTimer ()
                                                string speed_color = rgb_to_hexcolor(autocvar_hud_progressbar_acceleration_neg_color);
                                                float speed_conversion_factor = GetSpeedUnitFactor(autocvar_hud_speed_unit);
                                                float speed = vlen(vec2(csqcplayer.velocity));
-                                               float speed_diff = speed - race_checkpoint_splits_speed[race_checkpoint] ;
+                                               float speed_diff = rint(speed - race_checkpoint_splits_speed[race_checkpoint]);
                                                string units_text = autocvar_cl_race_cptimes_showspeed_unit ? GetSpeedUnit(autocvar_hud_speed_unit) : "";
                                                if(speed_diff > 0) speed_color = rgb_to_hexcolor(autocvar_hud_progressbar_acceleration_color);
                                                else if (speed_diff == 0) speed_color = "^3";