refactor(client/progress): minor adjustment to duration check

This commit is contained in:
Linden
2025-03-13 18:58:44 +11:00
parent 4690564755
commit 5fb16444e6

View File

@@ -142,18 +142,13 @@ local function startProgress(data)
end end
playerState.invBusy = false 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' }) SendNUIMessage({ action = 'progressCancel' })
return false return false
end end
local actualDuration = GetGameTimer() - startTime + 100 -- give slight leeway
if actualDuration <= data.duration then
return false
end
return true return true
end end