You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spring.SetNanoProjectileParams(number startRot, number speed, number accel)
Sets the rotation params of the nano-building projectile. Speed: deg/s, Acceleration: deg/s2, StartRot: deg.
Spring.Yield(number ms) -> boolean
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