From: Des Date: Mon, 16 Sep 2024 14:26:50 +0000 (-0300) Subject: Save hud_panel_racesplits_lines X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=66624663c0cc79a2a8c6e4cce12d636e557a6943;p=xonotic%2Fxonotic-data.pk3dir.git Save hud_panel_racesplits_lines --- 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)