]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix bug introduced by previous reordering of string generation
authorDes <xon@damianv.com.ar>
Sun, 1 Dec 2024 20:33:52 +0000 (17:33 -0300)
committerDes <xon@damianv.com.ar>
Sun, 1 Dec 2024 20:33:52 +0000 (17:33 -0300)
qcsrc/client/hud/panel/racetimer.qc

index d4b3ebe562c8392b407f8a3a0a66432bea7e856a..b8856765e8a5505adb1ca0384261a41822d86008 100644 (file)
@@ -219,8 +219,6 @@ void HUD_RaceTimer ()
                                }
                                else
                                {
-                                       string racetime_text = string_null;
-
                                        // build checkpoint split strings
                                        if(race_time && race_previousbesttime)
                                                s = MakeRaceString(race_checkpoint, TIME_DECODE(race_time) - TIME_DECODE(race_previousbesttime), 0, ((race_mypreviousbesttime) ? TIME_DECODE(race_time) - TIME_DECODE(race_mypreviousbesttime) : 0), 0, race_previousbestname);
@@ -240,9 +238,9 @@ void HUD_RaceTimer ()
                                                else if (speed_diff == 0) speed_color = "^3";
 
                                                if(race_time && race_previousbesttime && race_checkpoint_splits_speed[race_checkpoint])
-                                                       racetime_text = sprintf("%s ^7%d%s %s(%+d%s)", s, speed * speed_conversion_factor, units_text, speed_color, speed_diff * speed_conversion_factor, units_text);
+                                                       s = sprintf("%s ^7%d%s %s(%+d%s)", s, speed * speed_conversion_factor, units_text, speed_color, speed_diff * speed_conversion_factor, units_text);
                                                else
-                                                       racetime_text = sprintf("%s ^7%d%s", s, speed * speed_conversion_factor, units_text);
+                                                       s = sprintf("%s ^7%d%s", s, speed * speed_conversion_factor, units_text);
 
                                                // if fastest cp time, store speed for later comparison
                                                if((TIME_DECODE(race_time) - TIME_DECODE(race_previousbesttime)) < 0 || !race_checkpoint_splits_speed[race_checkpoint])
@@ -254,7 +252,7 @@ void HUD_RaceTimer ()
                                        if(race_time)
                                                forcetime = TIME_ENCODED_TOSTRING(race_time, false);
 
-                                       StoreRaceSplits(race_checkpoint, forcetime, racetime_text);
+                                       StoreRaceSplits(race_checkpoint, forcetime, s);
                                }
                        }
                        else