From 6817ae66491d9aab947608107cd2469a163fe5d1 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Wed, 17 Jan 2024 17:37:44 +1100 Subject: [PATCH] fix(imports/waitFor): normalise timeout --- imports/waitFor/shared.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/imports/waitFor/shared.lua b/imports/waitFor/shared.lua index fa9ee71..2bfa107 100644 --- a/imports/waitFor/shared.lua +++ b/imports/waitFor/shared.lua @@ -11,8 +11,12 @@ function lib.waitFor(cb, errMessage, timeout) if value ~= nil then return value end - if timeout or timeout == nil then - timeout = tonumber(timeout) or 1000 + timeout = tonumber(timeout) or 1000 + + if IsDuplicityVersion() then + timeout /= 50; + else + timeout -= GetFrameTime() * 1000; end local start = GetGameTimer()