]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'des/racetimer_speed' into des/racesplits_panel
authorDes <xon@damianv.com.ar>
Sun, 1 Dec 2024 20:38:21 +0000 (17:38 -0300)
committerDes <xon@damianv.com.ar>
Sun, 1 Dec 2024 20:38:21 +0000 (17:38 -0300)
1  2 
qcsrc/client/hud/panel/racetimer.qc

index 7a73def6870d006778dd41b92ecb89c5ed8b9eb1,b8856765e8a5505adb1ca0384261a41822d86008..ced30991633bf5f218712d9373af76404742f499
@@@ -229,9 -219,12 +229,15 @@@ void HUD_RaceTimer (
                                }
                                else
                                {
-                                       string speed_text = string_null;
 +                                      if (racetimer_have_stored_splits && racetimer_have_stored_splits_player != (current_player + 1)) // we changed player
 +                                              ClearRaceSplits(true);
++
+                                       // 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);
+                                       else
+                                               s = MakeRaceString(race_checkpoint, 0, -1, 0, 0, race_previousbestname);
                                        if(autocvar_cl_race_cptimes_showspeed)
                                        {
                                                float speed_conversion_factor = GetSpeedUnitFactor(autocvar_hud_speed_unit);
                                                {
                                                        race_checkpoint_splits_speed[race_checkpoint] = speed;
                                                }
 -
                                        }
-                                       // build checkpoint split strings
-                                       if(race_time && race_previousbesttime)
-                                               s = strcat(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), speed_text);
-                                       else
-                                               s = strcat(MakeRaceString(race_checkpoint, 0, -1, 0, 0, race_previousbestname), speed_text);
                                        if(race_time)
                                                forcetime = TIME_ENCODED_TOSTRING(race_time, false);