From 66624663c0cc79a2a8c6e4cce12d636e557a6943 Mon Sep 17 00:00:00 2001 From: Des Date: Mon, 16 Sep 2024 11:26:50 -0300 Subject: [PATCH] Save hud_panel_racesplits_lines --- qcsrc/client/hud/panel/racesplits.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/hud/panel/racesplits.qc b/qcsrc/client/hud/panel/racesplits.qc index 9b12439b8..facb0dfee 100644 --- a/qcsrc/client/hud/panel/racesplits.qc +++ b/qcsrc/client/hud/panel/racesplits.qc @@ -11,6 +11,7 @@ void HUD_RaceSplits_Export(int fh) { // allow saving cvars that aesthetically change the panel into hud skin files HUD_Write_Cvar("hud_panel_racesplits_flip"); + HUD_Write_Cvar("hud_panel_racesplits_lines"); } vector RaceSplits_drawstring(string s, vector pos, vector sz, float a, vector fontsize) @@ -58,7 +59,7 @@ void HUD_RaceSplits() } #define HUD_RACESPLITS_MAX_NRLINES 50 // feels like twice more than enough - int nrlines = autocvar_hud_panel_racesplits_lines <= HUD_RACESPLITS_MAX_NRLINES ? autocvar_hud_panel_racesplits_lines : HUD_RACESPLITS_MAX_NRLINES; + int nrlines = min(HUD_RACESPLITS_MAX_NRLINES, autocvar_hud_panel_racesplits_lines); vector fontsize = '0.8 1 0' * (mySize.y / (nrlines+2)); string s; if(!autocvar__hud_configure) -- 2.39.2