fix(imports/waitFor): normalise timeout

This commit is contained in:
Linden
2024-01-17 17:37:44 +11:00
parent 4ed709df9a
commit 6817ae6649

View File

@@ -11,8 +11,12 @@ function lib.waitFor(cb, errMessage, timeout)
if value ~= nil then return value end 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 end
local start = GetGameTimer() local start = GetGameTimer()