From 07b3cba378a67b182f20ed05fb9343f2a8155210 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Wed, 15 Mar 2023 18:22:14 -0500 Subject: [PATCH] fix font cache attempting to start with char 0x0, time delay generation by one second per to mitigate ap choke --- .../game/core/utility/scripts/helperFunctions.tscript | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Templates/BaseGame/game/core/utility/scripts/helperFunctions.tscript b/Templates/BaseGame/game/core/utility/scripts/helperFunctions.tscript index 0dcefd638..770413aab 100644 --- a/Templates/BaseGame/game/core/utility/scripts/helperFunctions.tscript +++ b/Templates/BaseGame/game/core/utility/scripts/helperFunctions.tscript @@ -654,14 +654,21 @@ function populateAllFonts() %fontarrayCount = %fontarray.count(); + echo("Generating "@ %fontarrayCount @" fonts"); for (%i=0;%i<%fontarrayCount;%i++) { %font = %fontarray.getKey(%i); %hieght = %fontarray.getValue(%i); - populateFontCacheRange(%font,%hieght,0,65535); + schedule(1000*%i,0,"delayedFontsPopulation",%font, %hieght, %i+1); } %fontarray.delete(); } +function delayedFontsPopulation(%font, %hieght, %fontNum) +{ + echo("Font ["@ %fontNum @"] Generating "@ %font SPC %hieght); + populateFontCacheRange(%font,%hieght,1,65535); +} + //------------------------------------------------------------------------------ function clientCMDPlaySound(%soundAssetId,%pos) {