]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use accel progressbar colors instead of made up ones, more consistent *and* configurable.
authorDes <xon@damianv.com.ar>
Sun, 8 Sep 2024 11:38:44 +0000 (08:38 -0300)
committerDes <xon@damianv.com.ar>
Sun, 8 Sep 2024 11:38:44 +0000 (08:38 -0300)
qcsrc/client/hud/panel/racetimer.qc

index 768945b4ffd8936517ca71f25566222b273b406d..844c5cfa8ff699ec1544cb4f1f02608d8e7bb1f0 100644 (file)
@@ -221,12 +221,12 @@ void HUD_RaceTimer ()
                                        string speed_text = string_null;
                                        if(autocvar_cl_race_cptimes_showspeed)
                                        {
-                                               string speed_color = "^xf73";
-                                               float speed_conversion_factor = GetSpeedUnitFactor(autocvar_hud_speed_unit);;
+                                               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] ;
                                                string units_text = autocvar_cl_race_cptimes_showspeed_unit ? GetSpeedUnit(autocvar_hud_speed_unit) : "";
-                                               if(speed_diff > 0) speed_color = "^x66f";
+                                               if(speed_diff > 0) speed_color = rgb_to_hexcolor(autocvar_hud_progressbar_acceleration_color);
                                                else if (speed_diff == 0) speed_color = "^3";
                                                if((TIME_DECODE(race_time) - TIME_DECODE(race_previousbesttime)) < 0 || !race_checkpoint_splits_speed[race_checkpoint])
                                                {