From 5fb16444e62b0ccf2e987efbe9174c48bae6d510 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Thu, 13 Mar 2025 18:58:44 +1100 Subject: [PATCH] refactor(client/progress): minor adjustment to duration check --- resource/interface/client/progress.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/resource/interface/client/progress.lua b/resource/interface/client/progress.lua index f31c4ab..43779b6 100644 --- a/resource/interface/client/progress.lua +++ b/resource/interface/client/progress.lua @@ -142,18 +142,13 @@ local function startProgress(data) end playerState.invBusy = false + local duration = progress ~= false and GetGameTimer() - startTime + 100 -- give slight leeway - if progress == false then + if progress == false or duration <= data.duration then SendNUIMessage({ action = 'progressCancel' }) return false end - local actualDuration = GetGameTimer() - startTime + 100 -- give slight leeway - - if actualDuration <= data.duration then - return false - end - return true end