mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-18 17:17:31 +00:00
Let camera shake when it's waiting for a capture
For some reason this improves chunk loading.
This commit is contained in:
parent
9c728e0ae2
commit
421f897be7
@ -80,19 +80,20 @@ local function captureScreenshot(pos, ensureLoaded, dontOverwrite, ctx, outputPi
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if pos then CameraAPI.SetPos(pos) end
|
|
||||||
|
|
||||||
-- Reset the count for the "Waiting for x frames." message in the UI.
|
-- Reset the count for the "Waiting for x frames." message in the UI.
|
||||||
if ctx then ctx.state.WaitFrames = 0 end
|
if ctx then ctx.state.WaitFrames = 0 end
|
||||||
|
|
||||||
-- Wait some additional frames.
|
-- Wait some additional frames.
|
||||||
if captureDelay and captureDelay > 0 then
|
if captureDelay and captureDelay > 0 then
|
||||||
for _ = 1, captureDelay do
|
for _ = 1, captureDelay do
|
||||||
|
if pos then CameraAPI.SetPos(pos + Vec2(math.random(-10, 10), math.random(-10, 10))) end
|
||||||
wait(0)
|
wait(0)
|
||||||
if ctx then ctx.state.WaitFrames = ctx.state.WaitFrames + 1 end
|
if ctx then ctx.state.WaitFrames = ctx.state.WaitFrames + 1 end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if pos then CameraAPI.SetPos(pos) end
|
||||||
|
|
||||||
if ensureLoaded then
|
if ensureLoaded then
|
||||||
local delayFrames = 0
|
local delayFrames = 0
|
||||||
repeat
|
repeat
|
||||||
|
Loading…
Reference in New Issue
Block a user