From: Des Date: Sun, 1 Dec 2024 20:38:21 +0000 (-0300) Subject: Merge branch 'des/racetimer_speed' into des/racesplits_panel X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f8c740dbb7ee2509b37a7df5164df9c83bf1e5df;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'des/racetimer_speed' into des/racesplits_panel --- f8c740dbb7ee2509b37a7df5164df9c83bf1e5df diff --cc qcsrc/client/hud/panel/racetimer.qc index 7a73def68,b8856765e..ced309916 --- a/qcsrc/client/hud/panel/racetimer.qc +++ b/qcsrc/client/hud/panel/racetimer.qc @@@ -229,9 -219,12 +229,15 @@@ void HUD_RaceTimer ( } else { + if (racetimer_have_stored_splits && racetimer_have_stored_splits_player != (current_player + 1)) // we changed player + ClearRaceSplits(true); - string speed_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); + 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); @@@ -254,12 -247,8 +260,7 @@@ { 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);