Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Recoil:Lua UnsyncedCtrl

From FIGHTORDER
Revision as of 02:57, 23 July 2026 by FightorderAdmin (talk | contribs) (Verbatim import from RecoilEngine wiki (GitHub))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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



Imported verbatim from the RecoilEngine wiki on GitHub (beyond-all-reason/RecoilEngine). See the source repository for full page history and authorship.