From 8cb2005ec13b0eda831039cb1d7814e555d4b8ef Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Fri, 8 Jul 2022 06:55:31 +0300 Subject: [PATCH] crutch to keep the notification --- CTI/Classes/CTI_RepInfo.uc | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/CTI/Classes/CTI_RepInfo.uc b/CTI/Classes/CTI_RepInfo.uc index b0daff4..93f8158 100644 --- a/CTI/Classes/CTI_RepInfo.uc +++ b/CTI/Classes/CTI_RepInfo.uc @@ -223,6 +223,7 @@ private simulated reliable client function ClientSyncFinished() `Log_Trace(`Location); + ClearTimer(nameof(KeepPreloadNotification)); ClearTimer(nameof(WaitForPreloadWeapon)); KFGRI = KFGameReplicationInfo(WorldInfo.GRI); @@ -374,19 +375,30 @@ private reliable client function ClientPreloadWeapon(class WC) Preloaded++; PreloadWeaponClass = WC; + + if (!IsTimerActive(nameof(KeepPreloadNotification))) + { + SetTimer(0.1f, true, nameof(KeepPreloadNotification)); + } + SetTimer(0.5f, false, nameof(WaitForPreloadWeapon)); } -private simulated function WaitForPreloadWeapon() +private simulated function KeepPreloadNotification() { - `Log_Trace(`Location); - HideReadyButton(); UpdateNotification( "Preload weapon models, please wait...", Repl(String(PreloadWeaponClass), "KFWeap_", ""), Preloaded @ "/" @ AddItems.Length, (float(Preloaded) / float(AddItems.Length)) * 100); +} + +private simulated function WaitForPreloadWeapon() +{ + `Log_Trace(`Location); + + KeepPreloadNotification(); if (GetKFIM() != None && KFIM.Instigator.Weapon != None