Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Commit 5fb1644

Browse files
committed
refactor(client/progress): minor adjustment to duration check
1 parent 4690564 commit 5fb1644

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

resource/interface/client/progress.lua

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,18 +142,13 @@ local function startProgress(data)
142142
end
143143

144144
playerState.invBusy = false
145+
local duration = progress ~= false and GetGameTimer() - startTime + 100 -- give slight leeway
145146

146-
if progress == false then
147+
if progress == false or duration <= data.duration then
147148
SendNUIMessage({ action = 'progressCancel' })
148149
return false
149150
end
150151

151-
local actualDuration = GetGameTimer() - startTime + 100 -- give slight leeway
152-
153-
if actualDuration <= data.duration then
154-
return false
155-
end
156-
157152
return true
158153
end
159154

0 commit comments

Comments
 (0)