GE Lua Documentation

Press F to search!

endRace

Definition


-- @/lua/ge/extensions/scenario/scenarios.lua:337

local function endRace(countDownTime)
  -- log('D', logTag, 'endRace called...'..tostring(countDownTime))
  if not scenario then return end

  if scenario.state ~= 'finished' and scenario.state ~= 'post' then
    changeState('finished')
    endRaceCountdown = countDownTime or scenario.endCountDownTime or 3;
    finalTime = scenario.timer
    --raceMarker.hide(true)
  end
end

Callers

@/lua/ge/extensions/scenario/waypoints.lua
    w.nextWps = {}
    scenario_scenarios.endRace()
    return
@/lua/ge/extensions/scenario/scenarios.lua
  if scenario.state ~= 'finished' then
    endRace(0)
  end
local function endScenario(countDownTime)
  endRace(countDownTime)
  extensions.hook('onEndScenario', countDownTime)
      if scenario.maxTime and scenario.timer > maxTime then
        endRace()
      end