updateGFX
Definition
-- @/lua/vehicle/electrics.lua:356
local function updateGFX(dt)
updateIgnitionStarterHandler(dt)
generateBlinkPulseHandler(dt)
local vals = M.values
-- the primary source values
automaticIndicatorStopHandler()
vals.accXSmooth = sensors.gx2
vals.accYSmooth = sensors.gy2
vals.accZSmooth = sensors.gz2
vals.odometer = partCondition.getRootPartOdometerValue()
vals.trip = partCondition.getRootPartTripValue()
vals.brakelights = nil
vals.nop = 0 --nop electrics for not yet working things
vals.parkingbrake = vals.parkingbrake_input
vals.parkingbrakelight = vals.parkingbrake > 0
vals.lights = lightsState
vals.lights_state = lightsState
if signalWarnState then
vals.turnsignal = 0
elseif signalRightState then
vals.turnsignal = 1
elseif signalLeftState then
vals.turnsignal = -1
else
vals.turnsignal = 0
end
vals.airspeed = obj:getGroundSpeed()
vals.airflowspeed = obj:getAirflowSpeed()
vals.altitude = obj:getAltitude()
vals.parking = 0 -- TODO: input.parkinglights
vals.reverse = (vals.gearIndex or 0) < 0
-- and then the derived values
vals.signal_L = vals.signal_left_input == 1 and blinkPulse
vals.signal_R = vals.signal_right_input == 1 and blinkPulse
vals.hazard = (signalWarnState and blinkPulse)
vals.hazard_enabled = signalWarnState
vals.lightbar = lightbarState
vals.lowpressure = (beamstate.lowpressure)
vals.oil = (vals.oiltemp or 0) >= 130
vals.lowhighbeam = (lightsState == 1 or lightsState == 2)
vals.lowbeam = (lightsState == 1)
vals.highbeam = (lightsState == 2)
vals.fog = fogLightsState
vals.horn = hornState
--mixed values for american style indicators/lights
vals.lowhighbeam_signal_R = vals.signal_right_input == 1 and (blinkPulse and 1 or 0) or ceil(vals.lowhighbeam and 1 or 0)
vals.lowhighbeam_signal_L = vals.signal_left_input == 1 and (blinkPulse and 1 or 0) or ceil(vals.lowhighbeam and 1 or 0)
--wigwag lights
--desired behavior: highbeam is controlled by normal highbeam values if lightbar is OFF
--if it's on, only the wigwag signal has control over the highbeam
local lightbarActive = vals.lightbar > 0
local wigwagRActive = vals.wigwag_R == 1
local wigwagLActive = vals.wigwag_L == 1
local highbeamActive = vals.highbeam
vals.highbeam_wigwag_R = ((highbeamActive and not lightbarActive) or (wigwagRActive)) and 1 or 0
vals.highbeam_wigwag_L = ((highbeamActive and not lightbarActive) or (wigwagLActive)) and 1 or 0
vals.reverse_wigwag_R = vals.wigwag_R == 1 or ceil(vals.reverse and 1 or 0)
vals.reverse_wigwag_L = vals.wigwag_L == 1 or ceil(vals.reverse and 1 or 0)
local rpm = vals.rpm
vals.rpmTacho = rpmSmoother:get(rpm, dt)
vals.rpmspin = (vals.rpmspin + dt * rpm * 6) % 360 --make sure to convert properly between the units here
vals.signal_right_input = (signalRightState)
vals.signal_left_input = (signalLeftState)
vals.boost = (vals.turboBoost or 0) + (vals.superchargerBoost or 0)
vals.boostMax = max((vals.turboBoostMax or 0), (vals.superchargerBoostMax or 0))
-- inject imported electrics events first time, this needs to happen twice overall so that code between gfx first step and gfx second step can see these updated electrics
beamstate.updateRemoteElectrics(true)
for f, v in pairs(vals) do
if M.disabledState[f] ~= nil then
vals[f] = nil
else
if type(v) == "boolean" then
vals[f] = vals[f] and 1 or 0
end
end
end
end
Callers
@/lua/vehicle/extensions/tech/GPS.lua
local function updateGFX(dtSim)
for sensorId, _ in pairs(GPSs) do
@/lua/vehicle/extensions/tech/tyreBarrier.lua
local function updateGFX(dtSim)
if IMUcontroller ~= nil then
@/lua/vehicle/extensions/api.lua
local function updateGFX()
httpJsonServer.update()
@/lua/vehicle/controller/playerController.lua
local function updateGFX(dt)
ballGroundContactNodesPast, ballGroundContactNodesNew = ballGroundContactNodesNew, ballGroundContactNodesPast
@/lua/vehicle/controller/tirePressureControl.lua
local function updateGFX(dt)
pEnv = obj:getEnvPressure()
@/lua/vehicle/controller/dummy.lua
local function updateGFX(dt)
electrics.values.throttle = math.min(math.max(input.throttle or 0, 0), 1)
@/lua/vehicle/extensions/tech/CANBus/ProjectBavariaController.lua
local function updateGFX(dt)
if playerInfo.firstPlayerSeated then
@/lua/vehicle/controller/drivingDynamics/actuators/activeCenterDiffLock.lua
local function updateGFX(dt)
if not controlParameters.isEnabled then
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/controller/pneumatics/liftAxleControl.lua
local function updateGFX(dt)
if currentMode == modes.drop then
@/lua/vehicle/controller/drivingDynamics/actuators/electronicSplitShaftLock.lua
local function updateGFX(dt)
if not controlParameters.isEnabled then
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/extensions/telemetryLogger.lua
local function updateGFX(dt)
if not isRecording then
@/lua/vehicle/controller/pneumatics/airbrakes.lua
local function updateGFX(dt)
updateSounds(dt)
@/lua/vehicle/controller/advancedCouplerControl.lua
local function updateGFX(dt)
if couplerGroup.spawnSoundDelayTimer > 0 then
@/lua/vehicle/controller/gauges/customModules/accelerationData.lua
local function updateGFX(dt)
end
@/lua/vehicle/powertrain.lua
local function updateGFX(dt)
M.currentGravity = obj:getGravity()
if device.updateGFX then
device:updateGFX(dt)
end
@/lua/vehicle/electrics.lua
customValueParser.updateGFX(dt)
@/lua/vehicle/controller/controlModes.lua
local function updateGFX(dt)
inputs.steering = input.steering
@/lua/vehicle/ai.lua
M.updateGFX = nop
local function updateGFX(dtGFX)
dt = dtGFX
@/lua/vehicle/sensors.lua
local function updateGFX(dt)
local ffisensors = M.ffiSensors
@/lua/vehicle/controller/pneumatics.lua
local function updateGFX(dt)
for _, g in pairs(beamGroups) do
@/lua/vehicle/extensions/dragAi.lua
local function updateGFX(dt)
if state == "ready" then
@/lua/vehicle/powertrain/supercharger.lua
local function updateGFX(dt)
-- Some verification stuff
@/lua/vehicle/powertrain/frictionClutch.lua
local function updateGFX(device, dt)
local kClutchToBellHousing = 30
@/lua/vehicle/extensions/debug/advancedExternalDebug.lua
local function updateGFX(dt)
mainDebugPacket.isActiveVehicle = playerInfo.firstPlayerSeated
@/lua/vehicle/powertrain/automaticGearbox.lua
local function updateGFX(device, dt)
--interpolate gear ratio to simulate the opening/closing clutches of the auto gearbox
@/lua/vehicle/powertrain/genericTorqueProvider.lua
local function updateGFX(device, dt)
device.outputRPM = device.outputAV1 * avToRPM
@/lua/vehicle/controller/drivingDynamics/supervisors/components/aeroControl.lua
local function updateGFX(dt)
end
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/beamstate.lua
local function updateGFX(dt)
-- Planet timers
@/lua/vehicle/controller/drivingDynamics/actuators/activeDiffLock.lua
local function updateGFX(dt)
if not controlParameters.isEnabled then
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/controller/propAnimation/singleAxisLever.lua
local function updateGFX(dt)
local gearModeIndex = electrics.values.gearModeIndex or 0
@/lua/vehicle/extensions/mqttGrafanaDemo.lua
local function updateGFX(dt)
if not client then return end
@/lua/vehicle/controller/wendoverGauges.lua
local function updateGFX(dt)
updateTimer = updateTimer + dt
@/lua/vehicle/extensions/tech/CANBus/ButtonBox.lua
local function updateGFX(dt)
if playerInfo.firstPlayerSeated then
@/lua/vehicle/extensions/core/quickAccess.lua
local function updateGFX(dt)
if actionCallbackCountdown then
@/lua/vehicle/controller/drivingDynamics/actuators/electronicDiffLock.lua
local function updateGFX(dt)
if not controlParameters.isEnabled then
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/controller/drivingDynamics/supervisors/slipProviders/virtualSpeedSlip.lua
local function updateGFX(dt)
end
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/powertrain/compressor.lua
local function updateGFX(device, dt)
if streams.willSend("pneumaticsData") then
@/lua/vehicle/controller/tech/MQTToutput.lua
local function updateGFX(dt)
updateData(dt)
@/lua/vehicle/extensions/tech/mesh.lua
local function updateGFX(dtSim)
for sensorId, _ in pairs(meshes) do
@/lua/vehicle/props.lua
local function updateGFX()
local evals = electrics.values
@/lua/vehicle/controller/drivingDynamics/sensors/virtualSensors.lua
local function updateGFX(dt)
end
local function updateGFXDebug(dt)
updateGFX(dt)
local virtual = M.virtual
@/lua/vehicle/controller/lightbar.lua
-- @param dt: Delta time since last frame in seconds
local function updateGFX(dt)
-- Skip if lightbar system isn't active
@/lua/vehicle/controller/drivingDynamics/sensors/sensorHub.lua
local function updateGFX(dt)
--print(M.accNoiseX + M.accNoiseY + M.accNoiseZ)
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/controller/beaconSpin.lua
local function updateGFX(dt)
electrics.values[electricsName] = electrics.values.lightbar > 0 and ((electrics.values[electricsName] + (dt * beaconSpeed)) % 360) or 0 --this needs to be 0 as otherwise the spotlights stay turned on :|
@/lua/vehicle/extensions/inputAnalyzer.lua
local function updateGFX(dt)
inputCheckTimer = inputCheckTimer + dt
@/lua/vehicle/extensions/tech/CANBus/RacingDisplay.lua
local function updateGFX(dt)
if playerInfo.firstPlayerSeated then
@/lua/vehicle/controller/etkGauges.lua
local function updateGFX(dt)
if not uiIsReady then
@/lua/vehicle/controller/gauges/customModules/dynamicRedlineData.lua
local function updateGFX(dt)
end
@/lua/vehicle/controller/axleLift.lua
local function updateGFX(dt)
local frontPos = frontRaisedPosition
@/lua/vehicle/controller/sound/linearMovement.lua
local function updateGFX(dt)
--get the current length of our sensor beam
@/lua/vehicle/extensions/tech/ACC.lua
local function updateGFX(dtSim)
@/lua/vehicle/powertrain/turbocharger.lua
local function updateGFX(dt)
--Some verification stuff
@/lua/vehicle/controller/drivingDynamics/supervisors/components/brakeControl.lua
local function updateGFX(dt)
electrics.values.isYCBrakeActive = isYCBrakeActive and 1 or 0
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/main.lua
lastDt = dtSim
sensors.updateGFX(dtSim) -- must be before input and ai
mapmgr.sendTracking() -- must be before ai
mapmgr.sendTracking() -- must be before ai
wheels.updateGFX(dtSim)
ai.updateGFX(dtSim) -- must be before input and after wheels
wheels.updateGFX(dtSim)
ai.updateGFX(dtSim) -- must be before input and after wheels
input.updateGFX(dtSim) -- must be as early as possible
ai.updateGFX(dtSim) -- must be before input and after wheels
input.updateGFX(dtSim) -- must be as early as possible
electrics.updateGFX(dtSim)
input.updateGFX(dtSim) -- must be as early as possible
electrics.updateGFX(dtSim)
controller.updateGFX(dtSim)
electrics.updateGFX(dtSim)
controller.updateGFX(dtSim)
electrics.updateGFXSecondStep(dtSim)
extensions.hook("updateGFX", dtSim) -- must be before drivetrain, hydros and after electrics
hydros.updateGFX(dtSim) -- must be early for FFB, but after (input, electrics) and before props
powertrain.updateGFX(dtSim)
hydros.updateGFX(dtSim) -- must be early for FFB, but after (input, electrics) and before props
powertrain.updateGFX(dtSim)
energyStorage.updateGFX(dtSim)
powertrain.updateGFX(dtSim)
energyStorage.updateGFX(dtSim)
drivetrain.updateGFX(dtSim)
energyStorage.updateGFX(dtSim)
drivetrain.updateGFX(dtSim)
beamstate.updateGFX(dtSim) -- must be after drivetrain
drivetrain.updateGFX(dtSim)
beamstate.updateGFX(dtSim) -- must be after drivetrain
protocols.updateGFX(dtSim)
beamstate.updateGFX(dtSim) -- must be after drivetrain
protocols.updateGFX(dtSim)
sounds.updateGFX(dtSim)
protocols.updateGFX(dtSim)
sounds.updateGFX(dtSim)
thrusters.updateGFX() -- should be after extensions.hook
sounds.updateGFX(dtSim)
thrusters.updateGFX() -- should be after extensions.hook
if playerInfo.firstPlayerSeated then
damageTracker.updateGFX(dtSim)
end
props.updateGFX() -- must be after hydros
material.updateGFX()
props.updateGFX() -- must be after hydros
material.updateGFX()
fire.updateGFX(dtSim)
material.updateGFX()
fire.updateGFX(dtSim)
recovery.updateGFX(dtSim)
fire.updateGFX(dtSim)
recovery.updateGFX(dtSim)
powertrain.updateGFXLastStage(dtSim)
@/lua/vehicle/energyStorage.lua
local function updateGFX(dt)
for i = 1, storageCount, 1 do
if storage.updateGFX then
storage:updateGFX(dt)
end
@/lua/vehicle/controller/braking/hydraulicPumpBrake.lua
local function updateGFX(dt)
--the engine technically runs the hydraulic pump for the brakes, so no spinning engine means no brake pressure
@/lua/vehicle/controller/braking/compressionBrake.lua
local function updateGFX(dt)
local compressionBrakeCoefActual = compressionBrakeCoef * (1 - sign(controlledEngine.requestedThrottle))
@/lua/vehicle/extensions/advancedwheeldebug.lua
local function updateGFX(dt)
if not isDebugEnabled then
@/lua/vehicle/energyStorage/n2oTank.lua
local function updateGFX(storage, dt)
storage.remainingMass = storage.storedEnergy / storage.energyDensity
@/lua/ge/extensions/core/input/bindings.lua
local wasWalking
local function updateGFX(dtRaw)
if filechangeTimeout then
@/lua/vehicle/extensions/escMeasurement.lua
local function updateGFX(dt)
if workerCoroutine ~= nil then
@/lua/vehicle/controller/inputOutputDemo.lua
--If you overload this method performance wise, fps will drop gracefully, so disk IO and other heavily unpredictable things are done/triggered from here (or user input)
local function updateGFX(dt)
LogInterestingData()
@/lua/vehicle/extensions/gameplayInterfaceModules/interactCargoContainers.lua
local anyContainerNeedsUpdate = false
local function updateGFX(dtSim)
anyContainerNeedsUpdate = false
@/lua/vehicle/extensions/utRecorder.lua
local function updateGFX(dt)
local pos = obj:getPosition()
@/lua/vehicle/controller/couplings/fifthwheel.lua
local function updateGFX(dt)
--print(state)
@/lua/vehicle/controller/hydraulics/electricHydraulics.lua
local function updateGFX(dt)
local motorThrottle = 0
@/lua/vehicle/powertrain/nitrousOxideInjection.lua
local function updateGFX(dt)
if assignedEngine.engineDisabled then
@/lua/vehicle/controller/braking/adaptiveBrakeLights.lua
local function updateGFX(dt)
local brakeValue = electrics.values.brake or 0
@/lua/vehicle/controller.lua
local function updateGFX(dt)
for i = 1, gfxUpdateCount, 1 do
if controller.updateGFX ~= nil then
print(" sortedControllers[" .. i .. "].updateGFX(dt) -- " .. tostring(controller.typeName))
end
@/lua/vehicle/controller/pneumatics/lowAirPressureWarning.lua
local function updateGFX(dt)
local pressure = relevantPressureTank and relevantPressureTank.currentPressure or 0
@/lua/vehicle/powertrain/electricMotor.lua
local function updateGFX(device, dt)
device:updateEnergyUsage()
@/lua/vehicle/controller/controllerTemplate.lua
local function updateGFX(dt)
end
@/lua/vehicle/electricsCustomValueParser.lua
local function updateGFX(dt)
--copy our main electrics into the sandboxed environment
@/lua/vehicle/extensions/core/booster.lua
local function updateGFX(dtSim)
local planets = {}
@/lua/vehicle/hydros.lua
local function updateGFX(dt) -- dt in seconds
local invPhysSteps = physicsDt / dt
@/lua/vehicle/controller/sound/airbrakes.lua
local function updateGFX(dt)
local brake = electrics.values[electricsBrakeName] or 0
@/lua/vehicle/controller/propAnimation/dualAxisLever.lua
local function updateGFX(dt)
updateTargetQueue(dt)
@/lua/vehicle/energyStorage/fuelTank.lua
local function updateGFX(storage, dt)
storage.remainingVolume = storage.storedEnergy / (storage.fuelLiquidDensity * storage.energyDensity)
@/lua/vehicle/controller/jato.lua
local function updateGFX(dt)
local jatoInput = min(electrics.values.jatoInput or 0, 1)
@/lua/vehicle/controller/drivingDynamics/supervisors/components/diffControl.lua
local function updateGFX(dt)
end
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/energyStorage/electricBattery.lua
local function updateGFX(storage, dt)
storage:setStoredEnergy(storage.storedEnergy)
@/lua/ge/extensions/util/export.lua
local function updateGFX(dt)
if lastMeshInfo and lastMeshInfo.dataIsReady then
@/gameplay/missionTypes/hypermiling/fluidConsumptionToGraph.lua
local function updateGFX(dtSim)
updateTimer = updateTimer + dtSim
@/lua/vehicle/controller/sound/reverseWarn.lua
local function updateGFX(dt)
tick = tick + dt
@/lua/vehicle/controller/4wd.lua
local function updateGFX(dt)
electrics.values.modeRangeBox = rangeBox and (rangeBox.mode == "low" and 1 or 0) or 0
@/lua/vehicle/extensions/aeroDebug.lua
local function updateGFX(dt)
if not isEnabled then
@/lua/vehicle/controller/drivingDynamics/supervisors/components/motorTorqueControl.lua
local function updateGFX(dt)
end
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/controller/linearActuators/linearActuatorTrailerFeet.lua
local function updateGFX(dt)
local currentPosition = actuator.currentExtendPercent
@/lua/vehicle/extensions/tech/platooning.lua
local function updateGFX(dtSim)
@/lua/vehicle/powertrain/hydraulicCylinder.lua
local function updateGFX(cylinder, dt)
local valvePosition = electrics.values[cylinder.directionElectricsName] or 0
@/lua/vehicle/extensions/straightLine.lua
local function updateGFX(dt)
if baseTargetPos then
@/lua/vehicle/controller/drivingDynamics/sensors/vehicleData.lua
local function updateGFX(dt)
end
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/ge/map.lua
local function updateGFX(dtReal, dtSim)
if dtSim > 0 then
@/lua/vehicle/controller/shiftLights.lua
local function updateGFX(dt)
local rpm = electrics.values[inputElectricsName]
@/lua/vehicle/extensions/tech/LINBus/LINBusPeak.lua
local function updateGFX(dt)
if M.isConnected then
@/lua/vehicle/controller/airplaneSurfaces.lua
local function updateGFX(dt)
local rudder = input.rudder or 0
@/lua/vehicle/controller/propAnimation/googlyEyes.lua
local function updateGFX(dt)
local sizeCoef = linearScale(sensors.gz, 0, defaultGravity * gravityMaxSizeCoef, maxSizeCoef, minSizeCoef)
@/lua/vehicle/controller/powertrainControl/rimPullControl.lua
local function updateGFX(dt)
--read the rim pull input from the relevant axis action
@/lua/vehicle/controller/drivingDynamics/CMU.lua
local function updateGFX(dt)
checkForRollOverAndCrash(dt)
local function updateGFXDebugNotEnabled(dt)
updateGFX(dt)
local function updateGFXDebugEnabled(dt)
updateGFX(dt)
@/lua/vehicle/controller/pyrotechnicCharge.lua
local function updateGFX(dt)
if not hasTriggered then
@/lua/vehicle/extensions/simpleTripApp.lua
local function updateGFX(dtSim)
local dtReal = obj:getRealdt()
@/lua/vehicle/controller/tech/screens.lua
local function updateGFX(dt)
end
@/lua/vehicle/controller/driveModes.lua
local function updateGFX(dt)
for _, buttonData in pairs(simpleControlButtons) do
@/lua/vehicle/controller/drivingDynamics/actuators/activeDiffBias.lua
local function updateGFX(dt)
if not controlParameters.isEnabled then
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/controller/beamNavigator.lua
local function updateGFX(dt)
updateTimer = updateTimer + dt
@/lua/vehicle/controller/drivingDynamics/supervisors/components/awdControl.lua
local function updateGFX(dt)
end
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/controller/twoStepLaunch.lua
local function updateGFX(dt)
if twoStepState == "idle" then
@/lua/vehicle/extensions/tech/advancedIMU.lua
local function updateGFX(dtSim)
for sensorId, _ in pairs(advancedIMUs) do
@/lua/vehicle/controller/vehicleController/vehicleController.lua
--drivingStrategy.core.updateGFX(dt)
@/lua/vehicle/controller/hydraulics/hydraulicTrailerFeet.lua
local function updateGFX(dt)
local currentPosition = feetCylinder.currentExtendPercent
@/lua/vehicle/controller/sound/AVAS.lua
local function updateGFX(dt)
local gear = electrics.values.gear
@/lua/vehicle/input.lua
local lockTypeWarned
local function updateGFX(dt)
gxSmoothMax = gx_Smoother:getUncapped(0, dt)
@/lua/vehicle/controller/braking/postCrashBrake.lua
local function updateGFX(dt)
if state == "idle" then
@/lua/vehicle/extensions/odometer.lua
local function updateGFX(dt)
relativeOdometer = relativeOdometer + abs(electrics.values.wheelspeed or 0) * dt
@/lua/vehicle/extensions/tech/CANBus/ProjectBavariaKombi.lua
local function updateGFX(dt)
if playerInfo.firstPlayerSeated then
@/lua/vehicle/powertrain/manualGearbox.lua
local function updateGFX(device, dt)
--local gearIndex = device.grindingShiftTargetIndex or device.gearIndex
@/lua/ge/main.lua
if geluaProfiler then geluaProfiler:start() end
map.updateGFX(dtReal, dtSim)
if geluaProfiler then geluaProfiler:add("luaPreRender map update") end
extensions.core_input_bindings.updateGFX(dtRaw)
simTimeAuthority.update(dtReal)
@/lua/vehicle/extensions/tech/idealRADARSensor.lua
local function updateGFX(dtSim)
for sensorId, _ in pairs(idealRADARs) do
@/lua/vehicle/controller/sbrGauges.lua
local function updateGFX(dt)
updateTimer = updateTimer + dt
@/lua/vehicle/powertrain/hydraulicPump.lua
local function updateGFX(device, dt)
for _, consumer in ipairs(device.connectedConsumers) do
for _, consumer in ipairs(device.connectedConsumers) do
consumer:updateGFX(device.accumulatorPressure, dt)
end
@/lua/vehicle/fire.lua
local function updateGFX(dt)
local rand = random(1) --use the same random value for all effects in this frame
@/lua/vehicle/extensions/tech/powertrainSensor.lua
local function updateGFX(dtSim)
for sensorId, _ in pairs(powertrains) do
@/lua/vehicle/material.lua
local function updateGFX()
-- check for changes
@/lua/vehicle/powertrain/electricServo.lua
local function updateGFX(device, dt)
--note: this method is only executed if any electrics name for the target angle is set
@/lua/vehicle/powertrain/combustionEngine.lua
local function updateGFX(device, dt)
device:updateFuelUsage()
device.turbocharger.updateGFX(dt)
device.supercharger.updateGFX(dt)
device.turbocharger.updateGFX(dt)
device.supercharger.updateGFX(dt)
device.nitrousOxideInjection.updateGFX(dt)
device.supercharger.updateGFX(dt)
device.nitrousOxideInjection.updateGFX(dt)
device.thermals.updateGFX(dt)
@/lua/vehicle/controller/pneumatics/actuators.lua
local function updateGFX(dt)
for _, g in pairs(crossFlowGroups) do
@/lua/vehicle/controller/gauges/genericGauges.lua
local function updateGFX(dt)
updateTimer = updateTimer + dt
@/lua/vehicle/energyStorage/pressureTank.lua
local function updateGFX(storage, dt)
-- calculate pressure from stored energy and capacity: PV = nRT, e = nRT, therefore PV = e and P = e / V
@/lua/vehicle/controller/drivingDynamics/supervisors/tractionControl.lua
local function updateGFX(dt)
isActiveSmoothed = isActiveSmoother:getUncapped(tractionControlActive and 1 or 0, dt)
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/powertrain/hydraulicAccumulator.lua
local function updateGFX(device, dt)
for _, consumer in ipairs(device.connectedConsumers) do
for _, consumer in ipairs(device.connectedConsumers) do
consumer:updateGFX(device.accumulatorPressure, dt)
end
@/lua/vehicle/controller/lineLock.lua
local function updateGFX(dt)
electrics.values[electricsName] = lineLockActive
@/lua/vehicle/extensions/vehicleStatsLogger.lua
local function updateGFX(dt)
if not doLogging then
@/lua/vehicle/controller/vivaceGauges.lua
local function updateGFX(dt)
updateTimer = updateTimer + dt
@/lua/vehicle/extensions/gameplayStatistic.lua
local function updateGFX(dt)
if lenstatSchedule > 0 then
@/lua/vehicle/extensions/cruiseControl.lua
local function updateGFX(dt)
if not isEnabled then
@/lua/vehicle/controller/gauges/customModules/combustionEngineData.lua
local function updateGFX(dt)
end
@/lua/vehicle/controller/gauges/customModules/environmentData.lua
local function updateGFX(dt)
end
@/lua/vehicle/controller/drivingDynamics/supervisors/yawControl.lua
local function updateGFX(dt)
isActiveSmoothed = isActiveSmoother:getUncapped(yawControlActive and 1 or 0, dt)
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/protocols.lua
local function updateGFX(dtSim)
if not playerInfo.firstPlayerSeated then return end
@/lua/vehicle/extensions/tech/CANBus/ProjectBavariaShifter.lua
local function updateGFX(dt)
if playerInfo.firstPlayerSeated then
@/lua/vehicle/powertrain/combustionEngineThermals.lua
local function updateGFX(dt)
updateCoolingGFXMethod(dt)
@/lua/vehicle/extensions/dynoClient.lua
local function updateGFX(dt)
if not dynoObjectID then return end
@/lua/vehicle/controller/gauges/customModules/tireData.lua
local function updateGFX(dt)
end
@/lua/vehicle/controller/gauges/customModules/navigationData.lua
local function updateGFX(dt)
end
@/lua/vehicle/powertrain/centrifugalClutch.lua
local function updateGFX(device, dt)
local kClutchToHousing = 20
@/lua/vehicle/extensions/escCalibration.lua
local function updateGFX(dt)
if skewStiffnessTestState == idleState then
@/lua/vehicle/extensions/tech/dumpPlayerInput.lua
-- this is called every frame
local function updateGFX(dt)
if not f then return end
@/lua/vehicle/extensions/tech/CANBus/CANBusPeak.lua
local function updateGFX(dt)
if M.isConnected and next(canMessageCallbacks) ~= nil then
@/lua/vehicle/extensions/gameplayInterface.lua
local function updateGFX(dt)
checkValueChangeNotificationMethod(dt)
@/lua/vehicle/extensions/perfectLaunch.lua
local function updateGFX(dt)
if state == "idle" then
straightLine.updateGFX(dt)
end
@/lua/vehicle/extensions/tech/roadsSensor.lua
local function updateGFX(dtSim)
for sensorId, _ in pairs(roadsSensors) do
@/lua/vehicle/controller/propAnimation/hPattern.lua
local function updateGFX(dt)
if not relevantGearbox and not demoMode then
@/lua/vehicle/controller/esc.lua
local function updateGFX(dt)
warningLightsTimer = warningLightsTimer + dt
@/lua/vehicle/controller/propAnimation/sequentialLever.lua
local function updateGFX(dt)
if not relevantGearbox then
@/lua/vehicle/thrusters.lua
local invalidThrusterControlWarned
local function updateGFX()
table.clear(thrusterState)
@/lua/vehicle/controller/dragTimer.lua
local function updateGFX(dt)
end
@/lua/vehicle/extensions/tech/wheelForces.lua
local function updateGFX()
end
@/lua/vehicle/controller/loggerTemplate.lua
-- If you overload this method performance wise, fps will drop gracefully, so disk IO and other heavily unpredictable things are done/triggered from here (or user input)
local function updateGFX(dt)
logInterestingData()
@/lua/vehicle/controller/drivingDynamics/supervisors/yawProviders/STMEstimate.lua
local function updateGFX(dt)
end
local function updateGFXDebug(dt)
updateGFX(dt)
@/lua/vehicle/extensions/dynamicVehicleData.lua
local function updateGFX(dt)
timer = timer + dt
@/lua/vehicle/controller/gauges/analogOdometer.lua
local function updateGFX(dt)
updateTimer = updateTimer + dt
@/lua/vehicle/controller/braking/transbrake.lua
local function updateGFX(dt)
electrics.values[electricsName] = gearbox.lockCoef == 0
@/lua/vehicle/controller/nitrousOxideInjection.lua
local function updateGFX(dt)
local tankRatio = engine.nitrousOxideInjection.getTankRatio()
@/lua/vehicle/controller/powertrainControl/activeCenterDiff.lua
local function updateGFX(dt)
end
@/lua/vehicle/extensions/tech/OBDEmulator.lua
local function updateGFX(dt)
if playerInfo.firstPlayerSeated then
@/lua/vehicle/extensions/vehiclePerformanceData.lua
local function updateGFX(dt)
--iterate active recordings and execute the update method
@/lua/vehicle/controller/powertrainControl/antiLag.lua
local function updateGFX(dt)
local throttle = electrics.values.throttle
@/lua/vehicle/sounds.lua
local function updateGFX(dt)
--crash sounds
@/lua/vehicle/controller/hydraulicSuspension.lua
local function updateGFX(dt)
if currentPumpFlow > 0 then
@/lua/vehicle/controller/braking/brakedDifferentialSteering.lua
local function updateGFX(dt)
local steering = electrics.values.steering_input or 0
@/lua/vehicle/wheels.lua
local function updateGFX(dt)
updateThermalsGFXMethod(dt)
@/lua/vehicle/extensions/scenario/shiftBooster.lua
local function updateGFX(dt)
if boostTime > 0.01 then
@/lua/vehicle/powertrain/sequentialGearbox.lua
local function updateGFX(device, dt)
if device.targetGearIndex then
@/lua/vehicle/controller/gauges/customModules/electricMotorData.lua
local function updateGFX(dt)
end