-
Notifications
You must be signed in to change notification settings - Fork 102
Lua_UnsyncedCtrl
lhog edited this page Dec 19, 2022
·
4 revisions
Sets the rotation params of the nano-building projectile. Speed: deg/s, Acceleration: deg/s2, StartRot: deg.
To be (optionally) used as assistance mean with async loading (LoadingMT = 1
re-implementation). ms
- specifies the amount of time in ms to sleep (default is 10). The purpose of the call is to give back OpenGL context from game-loading thread back to main thread to process events and draw with LuaIntro. Boolean return indicates if Spring.Yield() should be called moving on.
Ideally Spring.Yield() should be called from widgethandler/gadgethandler:Initialize() like following (gadgethandler example):
function gadgetHandler:Initialize()
local doMoreYield = (Spring.Yield ~= nil);
..........
for k, gf in ipairs(gadgetFiles) do
local gadget = self:LoadGadget(gf)
if (gadget) then
table.insert(unsortedGadgets, gadget)
if not IsSyncedCode() and doMoreYield then
doMoreYield = doMoreYield and Spring.Yield()
end
end
end