VE Lua Documentation

Press F to search!

resetSecondStage

Definition


-- @/lua/vehicle/wheels.lua:1139

local function resetSecondStage()
  M.wheelCount = initialWheelCountDec + 1
  M.rotatorCount = initialRotatorCountDec + 1
  M.wheelPower = 0

  invWheelCount = M.wheelCount > 0 and 1 / M.wheelCount or 0
  speedoWheelCount = initialSpeedoWheelCount
  invSpeedoWheelCount = speedoWheelCount > 0 and 1 / speedoWheelCount or 0

  for i = 0, initialWheelCountDec do
    local wd = M.wheels[i]
    damageTracker.setDamage("wheels", wd.name, false)
    damageTracker.setDamage("wheels", "tire" .. wd.name, false)
  end

  airspeedMapTimer = 0
  lastBrake = 0
  lastVirtualAirspeed = 0
  lastAccSign = 1
  airspeedResetTimer = 0
end

Callers

@/lua/vehicle/controller.lua

local function resetSecondStage()
  for _, v in pairs(sortedControllers) do
@/lua/vehicle/main.lua
  controller.reset()
  wheels.resetSecondStage()
  controller.resetSecondStage()
  wheels.resetSecondStage()
  controller.resetSecondStage()
  drivetrain.reset()