GE Lua Documentation

Press F to search!

newRaceStart

Definition


-- @/lua/ge/extensions/core/lapTimes.lua:639

--------------------------------------------------------------------
-- New Race System hooks
--------------------------------------------------------------------

local function newRaceStart(race)
  local segments = 0
  if race.path and race.path.pathnodes and race.path.pathnodes.sorted then
    segments = #race.path.pathnodes.sorted
  end
  M.setConfiguration({
    totalLaps = race.lapCount or 0,
    totalSegments = segments,
    closedCircuit = race.path and race.path.config and race.path.config.closed or false
  })
end

Callers

@/lua/ge/extensions/gameplay/race/race.lua
      else
        core_hotlapping.newRaceStart(self)
      end
    elseif events.rollingStarted then
      core_hotlapping.newRaceStart(self)
    elseif events.lapComplete then
@/lua/ge/extensions/core/hotlapping.lua

local function newRaceStart(race)
  M.start()