onUpdate
Definition
-- @/lua/ge/extensions/core/remoteController.lua:70
local function onUpdate()
-- TODO: move to 1 fps
if not udpSocket then return end
local currentTime = Engine.Platform.getSystemTimeMS()
for ip, lastPackageTime in pairs(lastPackageTimes) do
-- Unplug controller after a 10 seconds timeout
if virtualDevices[ip] ~= nil and currentTime - lastPackageTime > 10000 then
extensions.core_input_virtualInput.deleteDevice(virtualDevices[ip].deviceInst)
virtualDevices[ip] = nil
end
end
while true do
--log('D', logTag, "getting data from ".. tostring(listenPort))
local data, ip, listenPort = udpSocket:receivefrom(128)
if not data then
--log('D', logTag, "No data")
return
end
lastPackageTimes[ip] = currentTime
--udpSocket:setpeername(ip, port)
--log('D', logTag, "got '" .. tostring(data) .. "' from "..tostring(ip) .. ":" .. tostring(listenPort))
if(data:sub(0, 6) == 'beamng') then -- new device trying to connect
local args = split(data, '|')
--log('D', logTag, "data: " .. args[1] .. " : " .. args[2] .. " : " .. args[3])
local deviceName = args[2]
if deviceName == "" then
deviceName = "Unknown"
end
log('D', logTag, "Got discovery package from device " .. deviceName .. " with code " .. args[3])
if not (args[3] == tostring(code)) then
log('D', logTag, "Code doesn't match "..code..", ignoring package.")
else
if not virtualDevices[ip] then
local nAxes = 1
local nButtons = 2
local nPovs = 0
local deviceInst = extensions.core_input_virtualInput.createDevice(deviceName, "bngremotectrlv1", nAxes, nButtons, nPovs)
if not deviceInst or deviceInst < 0 then
log('E', logTag, 'unable to create remote controller input')
else
virtualDevices[ip] = { deviceInst = deviceInst, state = {} }
end
end
if virtualDevices[ip] ~= nil then
log('D', logTag, 'sending hello back to: ' .. ip .. ':' .. appPort)
local response = "beamng|" .. args[3]
udpSocket:sendto(response, ip, appPort)
end
end
elseif virtualDevices[ip] ~= nil then
local orientation = ffi.new("ori_t")
-- notice the reverse - for the network endian byte order
ffi.copy(orientation, data:reverse(), ffi.sizeof(orientation))
--log('D', logTag, 'got data: ' .. orientation.x .. ', ' .. orientation.y .. ', ' .. orientation.z.. ', ' .. orientation.w)
--log('D', logTag, "Got input package")
--log('D', logTag, "Orientation: "..floor(orientation.x * 100)..", "..floor(orientation.y*100)..", "..floor(orientation.z*100))
--log('D', logTag, string.format("Orientation: %0.2f, %0.2f, %0.2f", orientation.x, orientation.y, orientation.z))
local dev = virtualDevices[ip]
-- ask the vehicle to send the UI data to the target
local vehicle = assignedPlayers[dev.deviceInst] and getPlayerVehicle(assignedPlayers[dev.deviceInst]) or nil
if vehicle then
-- we reuse the outgauge extension for updating the user interface of the app
vehicle:queueLuaCommand('if outgauge then outgauge.sendPackage("' .. ip .. '", ' .. appPort .. ', ' .. orientation.w .. ') end')
end
-- normalize data
orientation.x = min(1, max(0, orientation.x))
orientation.y = min(1, max(0, orientation.y))
orientation.z = min(1, max(0, orientation.z))
-- send the received input events to the vehicle
local state = {
button0 = (orientation.x > 0.5) and 1 or 0,
button1 = (orientation.y > 0.5) and 1 or 0,
axis0 = orientation.z
}
if dev.state.button0 ~= state.button0 then extensions.core_input_virtualInput.emit(dev.deviceInst, "button", 0, (state.button0 > 0.5) and "down" or "up", state.button0) end
if dev.state.button1 ~= state.button1 then extensions.core_input_virtualInput.emit(dev.deviceInst, "button", 1, (state.button1 > 0.5) and "down" or "up", state.button1) end
if dev.state.axis0 ~= state.axis0 then extensions.core_input_virtualInput.emit(dev.deviceInst, "axis", 0, "change", state.axis0 ) end
dev.state = state
end
end
end
Callers
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/veJBeamTableVis.lua
local function onUpdate(dt)
if not vEditor.vehicle then return end
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veJBeamPicker.lua
local function onUpdate(dt)
if windowOpen[0] ~= true then return end
@/ui/ui-vue/src/services/UINavScalarEventsHandler.js
if (typeof onUpdate === "function") {
onUpdate({ axis: newAxis, direction: newDirection, oldDirection })
}
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/veJBeamSpellchecker.lua
local function onUpdate()
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/core/vehicleTriggers.lua
local hoveredTriggerId = {}
local function onUpdate(dtReal, dtSim, dtRaw)
if debugUIEnabled then
@/lua/ge/extensions/c2/webSocketHandler.lua
local function onUpdate(dt)
if not server then return end
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veGeneralData.lua
local function onUpdate()
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/core/gamestate.lua
local waitingForChangeUI = 0
local function onUpdate(dtReal, dtSim, dtRaw)
if #listeners == 0 or waitingForUIChangeToLoading then
@/lua/ge/extensions/c2/panelPlugins/vehicleManager.lua
local function onUpdate(dt)
if not activeServer or not next(subscribers) then return end
@/lua/ge/extensions/gameplay/police.lua
local function onUpdate(dt, dtSim)
if not M.enabled or not be:getEnabled() then return end
@/lua/ge/extensions/editor/meshEditor.lua
local function onUpdate()
hoveredMeshID = nil
@/lua/ge/extensions/career/modules/spawnPoints.lua
local lastUpdateTimer = updateTime
local function onUpdate(dtReal, dtSim, dtRaw)
-- Check if an undiscovered spawn point is close
@/lua/ge/extensions/ui/vehiclePaint.lua
local function onUpdate()
if not showUI[0] then return end
@/lua/ge/extensions/gameplay/crawl/utils.lua
if core_lapTimes then
core_lapTimes.onUpdate(0, dtSim, 0)
end
@/lua/ge/extensions/core/schemeCommandServer.lua
local function onUpdate()
if not udpSocket then return end
@/lua/ge/extensions/editor/vizHelper.lua
local function onUpdate()
Engine.Render.DynamicDecalMgr.addDecals(savedDecals)
@/lua/ge/extensions/gameplay/race/race.lua
function C:onUpdate(dt)
if not self.started then return end
@/lua/ge/extensions/gameplay/rally/vehicleTracker.lua
-- function C:onUpdate(dt, raceData)
function C:onUpdate(dtReal, dtSim, dtRaw)
-- function C:onUpdate(dt, raceData)
function C:onUpdate(dtReal, dtSim, dtRaw)
profilerPushEvent("VehicleTracker - onUpdate")
@/lua/ge/extensions/tech/ultrasonicTest.lua
-- Trigger execution to access the ultrasonic test class in every update cycle.
local function onUpdate(dtReal, dtSim, dtRaw)
@/lua/ge/extensions/editor/mainUpdate.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if editor.active then
if editor.editMode and editor.editMode.onUpdate then
editor.editMode.onUpdate(dtReal, dtSim, dtRaw)
end
@/lua/ge/extensions/gameplay/drift/stuntZones/hitPole.lua
function C:onUpdate(dtReal, dtSim)
if self.marker then
@/lua/ge/extensions/gameplay/rally/loop/roadSectionPenaltyKeeper.lua
function C:onUpdate()
local currentTime = self.manager.clock
@/lua/ge/extensions/career/modules/vehiclePerformance.lua
local function onUpdate(dtReal)
updateCameraZoom(dtReal)
@/lua/ge/extensions/core/jobsystem.lua
local dtTable = {dtReal = 0, dtSim = 0, dtRaw = 0}
local function onUpdate(dtReal, dtSim, dtRaw)
dtTable.dtReal = dtReal
@/lua/ge/extensions/flowgraph/modules/timerModule.lua
function C:onUpdate(dtReal, dtSim, dtRaw)
self.globalTime.real = self.globalTime.real + dtReal
@/lua/ge/extensions/gameplay/rally/recceApp.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not enabled then return end
@/lua/ge/extensions/career/modules/vehicleDeletionService.lua
local camDir = vec3()
local function onUpdate()
for vehId, data in pairs(flaggedVehicles) do
@/lua/ge/extensions/gameplay/missions/missionTypes/baseMission.lua
-- called each frame
function C:onUpdate(dtReal, dtSim, dtRaw) end
-- called when the activity stops. attempt might be nil
@/lua/ge/extensions/editor/missionStartPositionEditor.lua
local function onUpdate()
-- Get all missions in the current level
@/lua/ge/extensions/flowgraph/nodes/gameplay/race/fileRace.lua
end
self.race:onUpdate(self.mgr.dtSim)
end
@/lua/ge/extensions/flowgraph/baseModule.lua
function C:clear() end
function C:onUpdate(dtReal, dtSim, dtRaw) end
function C:executionStopped() end
@/lua/ge/extensions/tech/platoonFunctions.lua
local function onUpdate(dtReal, dtSim, dtRaw)
local distance
@/lua/ge/extensions/gameplay/crashTest/crashTestBoundaries.lua
local function onUpdate()
checkOutOfBounds(be:getPlayerVehicleID(0))
@/lua/ge/extensions/tech/lidarTest.lua
-- Trigger execution to access the LiDAR test class in every update cycle.
local function onUpdate(dtReal, dtSim, dtRaw)
@/lua/ge/extensions/ui/console.lua
local previouslyShown
local function onUpdate(dtReal, dtSim, dtRaw)
if windowOpen[0] ~= true then
@/lua/ge/extensions/core/ropeVisualTest.lua
local function onUpdate(dt)
-- Update performance statistics
@/lua/ge/extensions/gameplay/rally/audioManager.lua
function C:onUpdate(dtReal, dtSim, dtRaw)
profilerPushEvent("AudioManager - onUpdate")
@/lua/ge/extensions/ui/apps/minimap/additionalInfo.lua
local function onUpdate()
checkRoute()
@/lua/ge/extensions/career/modules/loanerVehicles.lua
local playerPos = vec3()
local function onUpdate(dtReal, dtSim, dtRaw)
for inventoryId, vehId in pairs(career_modules_inventory.getMapInventoryIdToVehId()) do
@/lua/ge/extensions/ui/cameraDistanceApp.lua
local function onUpdate(dtReal, dtSim, dtRaw)
-- TODO: convert into stream
@/lua/ge/extensions/gameplay/walk.lua
local vehPos = vec3()
local function onUpdate(dtReal, dtSim)
local showMessage = false
@/lua/ge/extensions/editor/decalEditor.lua
local function onUpdate()
local res = cameraMouseRayCast()
@/lua/ge/extensions/core/repository.lua
local function onUpdate(dt)
if progressQueueDirty then
@/lua/ge/extensions/gameplay/garageMode.lua
local function onUpdate(dtReal)
if not active then return end
@/lua/ge/extensions/freeroam/bigMapMode.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not bigMap then return end
@/lua/ge/extensions/flowgraph/modules/vehicleModule.lua
function C:onUpdate()
for _, id in ipairs(self.sortedIds) do
@/lua/ge/extensions/career/modules/vehicleShopping.lua
local currentUiState
local function onUpdate()
if tableIsEmpty(vehicleWatchlist) or (currentUiState and currentUiState ~= "play") then return end
@/lua/ge/extensions/ui/bindingsLegend.lua
local function onUpdate(dtReal, dtSim, dtRaw)
fadeUpdate(dtReal)
@/lua/ge/extensions/career/modules/delivery/parcelManager.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not dGeneral then return end
@/lua/ge/extensions/flowgraph/manager.lua
function C:onUpdate(dtReal, dtSim, dtRaw)
self.frameCount = self.frameCount + 1
for _, mod in ipairs(self.moduleOrder) do
self.modules[mod]:onUpdate(dtReal, dtSim, dtRaw)
end
@/lua/ge/extensions/remoteControl/remoteControl.lua
local timer = 0
local function onUpdate(dtReal, dtSim, dtRaw)
timer = timer + dtReal
@/lua/ge/extensions/gameplay/drift/general.lua
local function onUpdate()
imguiDebug()
@/lua/ge/extensions/editor/roadEditor.lua
local function onUpdate()
local rayCastHit
@/lua/ge/extensions/gameplay/drift/stuntZones/driftThrough.lua
function C:onUpdate()
self:sendDecals()
@/lua/ge/extensions/career/modules/delivery/generator.lua
local function onUpdate(dtReal, dtSim, dtRaw)
hasGeneratedThisFrame = false
@/lua/ge/extensions/gameplay/drag/dragTypes/dragPracticeRace.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if shouldClearAfterFinish then
@/lua/ge/extensions/editor/rallyEditor.lua
devTools:draw()
devTools:onUpdate() -- Call onUpdate to handle 3D debug drawing
im.End()
-- local function onUpdate(dtReal, dtSim, dtRaw)
-- end
@/lua/ge/extensions/career/career.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not careerActive then return end
@/lua/ge/extensions/core/vehicle/partmgmt.lua
local function onUpdate(dt)
if partsSelectorChangedTime then
@/lua/ge/extensions/editor/raceEditor/testing.lua
elseif self.state == 'race' then
self.race:onUpdate(dt)
self:drawRace()
@/gameplay/missionTypes/aiRace/customNodes/activateRaceNode.lua
if not self.pinIn.idle.value then
self.race:onUpdate(self.mgr.dtSim)
end
@/lua/ge/extensions/gameplay/rally/geometry.lua
local pacenotes = nil
local function onUpdate(dt, dtSim)
if core_groundMarkers.currentlyHasTarget() then
@/lua/ge/extensions/flowgraph/nodes/activity/activityFlow.lua
end
function C:onUpdate(...)
if not self.mgr.activity then
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/vePropTransformer.lua
local function onUpdate(dt)
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/util/maptiles.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not renderView then
@/lua/ge/extensions/util/wsTest.lua
local function onUpdate()
if not server then return end
@/lua/ge/extensions/core/input/vibrationDebug.lua
local function onUpdate()
imgui.Begin("Vibration Debug")
@/lua/ge/extensions/editor/gen/world.lua
local function onUpdate()
if _dbdrag then return end
if U._PRD == 0 and out.R then
out.R.onUpdate()
end
if U._PRD == 0 then
N.onUpdate()
done = M.onUpdate()
N.onUpdate()
done = M.onUpdate()
end
if Ter and not out.interr then
out.interr = Ter.onUpdate()
if out.interr then
if editor.isWindowVisible('LAT') and D then
local inroad = D.onUpdate()
if inroad then
elseif U._MODE == 'ter' and Ter and not out.interr then
out.interr = Ter.onUpdate()
if out.interr then return end
@/lua/ge/extensions/gameplay/rally/loop/rallyLoopManager.lua
function C:onUpdate(dtReal, dtSim, dtRaw)
profilerPushEvent("rallyLoopManager:onUpdate")
if self.roadSectionPenaltyKeeper then
self.roadSectionPenaltyKeeper:onUpdate()
end
@/lua/ge/extensions/gameplay/traffic/roles/police.lua
function C:onUpdate(dt, dtSim)
local targetVeh = self.targetId and gameplay_traffic.getTrafficData()[self.targetId]
@/lua/ge/extensions/flowgraph/nodes/events/onUpdate.lua
function C:onUpdate(dtReal, dtSim, dtRaw)
self.pinOut.flow.value = true
@/lua/ge/extensions/core/dynamicProps.lua
local locationInfo
function DynamicProps:onUpdate()
local function onUpdate()
cameraPos = core_camera.getPosition()
for i = 1, #dynamicPropsObjs, 1 do
dynamicPropsObjs[i]:onUpdate()
end
@/lua/ge/extensions/gameplay/rally/tools/devTools.lua
function C:onUpdate()
-- Only draw debug visualizations when the Pacenotes Tools section is expanded
-- self.drivelineRoute:onUpdate()
-- self.drivelineRoute:drawDebugDrivelineRoute()
@/lua/ge/extensions/gameplay/drift/freeroam/cruising.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if gameplay_drift_general.getGeneralDebug() then profiler:start() end
@/lua/ge/extensions/gameplay/traffic.lua
if veh then
veh:onUpdate(dt, dtSim)
local function onUpdate(dtReal, dtSim)
if state == 'loading' then
@/lua/ge/extensions/gameplay/drag/dragTypes/headsUpDrag.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if hasActivityStarted then
@/lua/ge/extensions/editor/gen/region.lua
local function onUpdate(inj)
D = inj.D
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veVehicleSpawner.lua
local function onUpdate()
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/gameplay/drift/stuntZones.lua
local function onUpdate(dtReal, dtSim, dtRaw)
pos:set(gameplay_drift_drift.getVehPos() or vec3(0,0,0))
if stuntZone.onUpdate then stuntZone:onUpdate(dtReal, dtSim) end
@/lua/ge/extensions/freeroam/specialTriggers.lua
local function onUpdate(dt, dtSim)
if not next(triggers) then return end
@/lua/ge/extensions/ui/messagesTasksAppContainers.lua
local function onUpdate()
if not debug or not im then
@/lua/ge/extensions/gameplay/traffic/roles/standard.lua
function C:onUpdate(dt, dtSim)
if self.state == 'disabled' then return end
@/lua/ge/extensions/editor/buildingEditor.lua
local function onUpdate()
W.onUpdate()
local function onUpdate()
W.onUpdate()
if not ishit then
-- D.onUpdate()
end
if U._PRD==0 and not ishit then
D.onUpdate()
R.onUpdate({D = D, W = W})
D.onUpdate()
R.onUpdate({D = D, W = W})
end
@/lua/ge/extensions/core/couplerCameraModifier.lua
local function onUpdate()
local vehicleId = be:getPlayerVehicleID(0)
@/lua/ge/extensions/gameplay/drift/display.lua
local function onUpdate(dtReal, dtSim, dtRaw)
imguiDebug()
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veAeroDebug.lua
local function onUpdate(dt)
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/ui/apps/pointsBar.lua
local function onUpdate()
if not im then return end
@/gameplay/missions/gridmap_v2/aiRace/001-grindergrandprix/script.lua
function C:onUpdate(dtReal, dtSim, dtRaw)
-- Loop through all spinners and update their timers
@/lua/ge/extensions/tech/adasUltrasonic.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not loaded then
@/lua/ge/extensions/gameplay/drift/freeroam/driftSpots.lua
local function onUpdate(dtReal, dtSim, dtRaw)
isBeingDebugged = gameplay_drift_general.getExtensionDebug("gameplay_drift_freeroam_driftSpots")
@/lua/ge/extensions/util/groundModelDebug.lua
local axisToDraw = false -- x axis, vs y axis
local function onUpdate(dt)
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/gameplay/drag/debug.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if debugMenu then
@/lua/ge/extensions/core/vehicle/manager.lua
local function onUpdate()
spawn.clearCache()
@/lua/ge/extensions/gameplay/missions/missionManager.lua
local debugApprove = false
local function onUpdate(dtReal, dtSim, dtRaw)
if showDebugWindow then
if mission._isOngoing then
mission:onUpdate(dtReal, dtSim, dtRaw)
end
@/lua/ge/extensions/editor/camPathEditor.lua
local function onUpdate(dtReal, dtSim, dtRaw)
-- Update function - currently unused but kept for future functionality
@/lua/ge/extensions/freeroam/crashCamMode.lua
local function onUpdate(dtReal, dtSim)
if not crashCamEnabled and not forcedEnabled then return end
@/lua/ge/extensions/ui/extApp.lua
local function onUpdate()
if not server then return end
@/lua/ge/extensions/gameplay/drift/stallingSystem.lua
local function onUpdate()
imguiDebug()
@/lua/ge/extensions/career/modules/tether.lua
local remove = false
local function onUpdate()
for _, t in ipairs(tethers) do
@/lua/ge/extensions/gameplay/missions/missionTypes/flowMission.lua
-- update each frame
function C:onUpdate(dtReal, dtSim, dtRaw)
--self.mgr:broadcastCall('onUpdate', dtReal, dtSim, dtRaw)
if self.script and self.script.onUpdate then
self.script:onUpdate(dtReal, dtSim, dtRaw)
end
@/lua/ge/extensions/gameplay/crawl/general.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if M.activeTrail then
@/lua/ge/extensions/trackbuilder/trackBuilder.lua
-- shows either the main window, the drive window or nothing when a screenshot is taken.
local function onUpdate()
@/lua/ge/extensions/core/environment.lua
local function onUpdate()
local levelInfo = getObject("LevelInfo")
@/lua/ge/extensions/editor/gen/terrain.lua
local function onUpdate()
-- if true then return end
@/lua/ge/extensions/editor/audioEventsList.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not editor or not editor.beginWindow then return end
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/vePowerTrain.lua
local function onUpdate(dt)
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/gameplay/drift/drift.lua
local function onUpdate(dtReal, _dtSim, dtRaw)
dtSim = _dtSim
@/lua/ge/extensions/gameplay/drag/dragTypes/bracketRace.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if hasActivityStarted then
@/lua/ge/extensions/util/stepHandler.lua
local dtTable = {}
local function onUpdate(dtReal, dtSim, dtRaw)
if showDebugWindow then
@/inspector/External/three.js/three.js
if ( texture.onUpdate ) texture.onUpdate( texture );
if ( texture.onUpdate ) texture.onUpdate( texture );
console.warn( 'THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.' );
return this;
@/lua/ge/extensions/gameplay/drift/scoreboard.lua
local function onUpdate()
if firstUpdateFrame then
@/lua/ge/extensions/ui/messagesDebugger.lua
-- Draw the debug window
local function onUpdate(dtReal, dtSim, dtRaw)
if not windowOpen[0] then return end
@/lua/ge/extensions/gameplay/crashTest/scenarioManager.lua
local function onUpdate(dtReal, dtSim)
if not crashTestData.scenarioFinished then
@/lua/ge/extensions/core/metrics.lua
end
local function onUpdate(dtReal, dtSim, dtRaw)
if M.currentMode == 0 then return end
@/lua/ge/extensions/gameplay/taxi.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not be:getPlayerVehicle(0) then return end
@/lua/ge/extensions/career/modules/insurance/insurance.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not gameplay_missions_missionManager.getForegroundMissionId() and not gameplay_walk.isWalking() and activeInsuranceId > 0 then -- we don't track when in a mission
@/lua/ge/extensions/util/vehicleRopeDebug.lua
-- Main update function
local function onUpdate(dt)
-- Update performance statistics
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/veJBeamVariablesChecker.lua
local function onUpdate()
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veRawData.lua
local function onUpdate()
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/util/nodeStream.lua
local function onUpdate(dt)
if not server then
@/lua/ge/extensions/career/modules/inspectVehicle.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not testDriveVehInfo then return end
@/lua/ge/extensions/core/flowgraphManager.lua
local function onUpdate()
for _, mgr in ipairs(managers) do
@/gameplay/missions/gridmap_v2/collection/002-blenderbowl/script.lua
function C:onUpdate(dtReal, dtSim, dtRaw)
-- Loop through all spinners and update their timers
@/lua/ge/extensions/career/modules/inventory.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if saveCareer then
@/lua/ge/extensions/career/modules/fuel.lua
local uiFuelDataDeltaCounter = 0
local function onUpdate(dtReal, dtSim)
if showUI then
@/lua/ge/extensions/gameplay/drift/sounds.lua
local function onUpdate(dtReal, _dtSim, dtRaw)
dtSim = _dtSim
@/lua/ge/extensions/ui/gameplayAppContainers.lua
-- Update function for dtSim timer accumulation and queue processing
local function onUpdate(dtReal, dtSim, dtRaw)
-- Process current flash message timer using dtSim (pauses with game simulation)
@/lua/ge/extensions/editor/trafficManager.lua
local function onUpdate(dt, dtSim)
if not session then return end
@/lua/ge/extensions/core/chat.lua
local function onUpdate()
--log('D', 'chat', 'onUpdate')
@/lua/ge/extensions/gameplay/drag/times.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not dragData or not dragData.racers or dragData.isCompleted then return end
@/lua/ge/extensions/statistics/statistics.lua
local function onUpdate()
local scenario = scenario_scenarios and scenario_scenarios.getScenario()
@/lua/ge/extensions/career/modules/rentals.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if isRenting() then
@/lua/ge/extensions/gameplay/drift/scoring.lua
local function onUpdate(dtReal, _dtSim)
dtSim = _dtSim
@/lua/ge/extensions/tech/sensors.lua
local function onUpdate(dtReal, dtSim, dtRaw)
-- Send the data to the user's lua update callback.
d.fileRef.onUpdate(
dtSim,
@/lua/ge/extensions/career/modules/partInventory.lua
local addNewVehiclePartsInventoryId
local function onUpdate()
-- Add a new vehicles' parts to the inventory
@/lua/ge/extensions/editor/gen/decal.lua
local function onUpdate(rayCast)
-- lo('?? D.unUpd:')
@/lua/ge/extensions/tech/rawLidar.lua
-- This function is called in every frame, and contains the latest Raw LiDAR sensor readings.
local function onUpdate(dt, depth1, depth2, depth3, depth4, annot1, annot2, annot3, annot4)
userDLL.bng_rawLidar_onUpdate( -- Send the data to the user's .dll, in the per-frame update callback.
@/lua/ge/extensions/gameplay/util/damageAssessment.lua
local function onUpdate()
if debug then
@/lua/ge/extensions/core/versionUpdate.lua
local countdownWorkaround = 2
local function onUpdate()
countdownWorkaround = countdownWorkaround - 1
@/lua/ge/extensions/gameplay/drift/destination.lua
local function onUpdate()
isBeingDebugged = gameplay_drift_general.getExtensionDebug("gameplay_drift_destination")
@/lua/common/extensions/ui/improfiler.lua
function M.onUpdate(dtReal, dtSim, dtRaw)
if im.Begin("LuaJIT Profiler", windowOpen) then
@/lua/ge/extensions/render/viewDemo.lua
local function onUpdate(dtReal, dtSim, dtRaw)
timer = timer + dtSim
@/lua/ge/extensions/editor/main.lua
local function onUpdate()
-- if there is a toggle editor request
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/veJBeamBeautifier.lua
local function onUpdate()
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/core/hotlapping.lua
local function onUpdate(dt, dtSim)
if editMode and pathData then
if raceData then
raceData:onUpdate(dtSim)
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veCrashTester.lua
local function onUpdate()
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/core/lapTimes.lua
-- Main update function (called from extension system)
local function onUpdate(dtReal, dtSim, dtRaw)
-- Only send streams when flagged - data is already prepared by updateXFromRace functions
@/gameplay/missions/italy/arrive/012-Field/script.lua
function C:onUpdate(dtReal, dtSim, dtRaw)
if not self.readyFlag then
@/lua/ge/extensions/core/vehicle/inplaceEdit.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not vBundle then
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veTCSDebug.lua
local function onUpdate(dt)
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/gameplay/rally/rallyManager.lua
function C:onUpdate(dtReal, dtSim, dtRaw)
profilerPushEvent("rallyManager:onUpdate")
if self.vehicleTracker then
self.vehicleTracker:onUpdate(dtReal, dtSim, dtRaw)
end
if self.drivelineRoute then
self.drivelineRoute:onUpdate(dtReal, dtSim, dtRaw)
end
if self.audioManager then
self.audioManager:onUpdate(dtReal, dtSim, dtRaw)
end
@/lua/ge/extensions/gameplay/traffic/vehicle.lua
function C:onUpdate(dt, dtSim)
if not map.objects[self.id] then return end
self.role:onUpdate(dt, dtSim)
else
@/lua/ge/extensions/gameplay/parking.lua
local vehPos = vec3()
local function onUpdate(dt, dtSim)
if not active or not sites or not be:getEnabled() or freeroam_bigMapMode.bigMapActive() then return end
@/lua/ge/extensions/util/testExtensionProxies.lua
function ExtensionProxyTester:onUpdate(dtReal, dtSim, dtRaw)
print('ExtensionProxyTester:onUpdate called: ' .. tostring(self.id) .. ', ' .. tostring(dtReal))
--extProxy.hookProxies.onUpdate(123)
end
@/lua/ge/extensions/editor/veMain.lua
-- intentionally calling onUpdate 2 times to initialize editor (because of loading popup deferred initialization)
editor_main.onUpdate()
editor_main.onUpdate()
editor_main.onUpdate()
editor_main.onUpdate()
-- force call main update mainly for imgui layout state save
editor_main.onUpdate()
end
@/lua/ge/extensions/career/modules/delivery/vehicleTasks.lua
local toDeleteActiveTrailerIndexes = {}
local function onUpdate(dtReal, dtSim, dtRaw)
taskThatChangedThisFrame = nil
@/lua/ge/extensions/gameplay/forceField.lua
local lastUpdateTimer = updateTime
local function onUpdate(dtReal, dtSim, dtRaw)
lastUpdateTimer = lastUpdateTimer + dtSim
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/veJBeamModifierLeakVis.lua
local function onUpdate()
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/gameplay/statistic.lua
local function onUpdate(dtReal, dtSim, dtRaw)
@/lua/ge/extensions/flowgraph/modules/driftModule.lua
function C:onUpdate()
for _, callbackData in pairs(self.callbacks) do
@/lua/ge/extensions/core/trafficSignals.lua
local function onUpdate(dt, dtSim)
if not loaded then return end
@/lua/ge/extensions/campaign/exploration.lua
-- executed every frame, also when not rendering 3d in the menu
local function onUpdate()
local campaign = campaign_campaigns and campaign_campaigns.getCampaign()
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veFlexbodyDebug.lua
local function onUpdate(dt)
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veAdjustableTechCarTuner.lua
local function onUpdate()
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/gameplay/backgroundActivities/g2g.lua
local lastUpdateTimer = updateTime
local function onUpdate(dtReal, dtSim, dtRaw)
end
@/lua/ge/extensions/core/quickAccess.lua
local function onUpdate()
-- logic for the menu assembling timeout
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veNodeTriSelfCollisionDetector.lua
local function onUpdate()
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/career/modules/marketplace.lua
local timeSinceUpdate = 0
local function onUpdate(dtReal, dtSim, dtRaw)
if tableIsEmpty(listedVehicles) or offerMenuOpen then
@/lua/ge/extensions/editor/api/dynamicDecals.lua
app.textureSet = decalProjection:getTextureSet()
app:onUpdate()
profilerPushEvent('dynamicDecals/app:onUpdate_()')
app:onUpdate()
profilerPopEvent('dynamicDecals/app:onUpdate_()')
-- force to refresh the new vehicle shape
if(app) then app.onUpdate() end
M.updateVehicleMaterials()
@/lua/ge/extensions/gameplay/rallyLoop.lua
local function onUpdate(dtReal, dtSim, dtRaw)
profilerPushEvent("gameplay_rallyLoop - onUpdate")
if rallyLoopManager then
rallyLoopManager:onUpdate(dtReal, dtSim, dtRaw)
@/lua/ge/extensions/core/multiseatCamera.lua
local function onUpdate()
local i = 0
@/lua/ge/extensions/util/screenshotCreator.lua
local lastFrameImageResolution = {}
local function onUpdate(dtReal, dtSim, dtRaw)
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/freeroam/freeroam.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if worldReadyState == 0 then
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veLightsDebug.lua
local function onUpdate()
if windowOpen[0] ~= true then return end
@/lua/ge/extensions/gameplay/traffic/baseRole.lua
function C:onUpdate(dt, dtSim)
end
@/lua/ge/extensions/gameplay/rally.lua
local lastTime = 0
local function onUpdate(dtReal, dtSim, dtRaw)
profilerPushEvent("gameplay_rally - onUpdate")
-- gcprobe()
RecceApp.onUpdate(dtReal, dtSim, dtRaw)
-- gcprobe()
if rallyManager and not RecceApp.isRecording() then
rallyManager:onUpdate(dtReal, dtSim, dtRaw)
end
@/lua/ge/extensions/tech/rawLidarEmpty.lua
-- This function is called in every frame, and contains the latest Raw LiDAR sensor readings.
local function onUpdate(dt, depth1, depth2, depth3, depth4, annot1, annot2, annot3, annot4)
-- Your implementation goes here.
@/lua/ge/extensions/gameplay/util/crashDetection.lua
local vehIdList = {}
local function onUpdate(dtReal, _dtSim)
@/lua/ge/extensions/util/trackBuilder/splineTrack.lua
-- called every frame. when high quality is enabled, manages the timer on low quality track segments so they can be upgraded one after another.
local function onUpdate()
if not subTracks[subTrackIndex] or not highQuality or not markersShown then return end
@/lua/ge/extensions/editor/gen/network.lua
local function onUpdate()
-- pathsUp()
@/lua/ge/extensions/tech/utils.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not tech_license.isValid(path) then return end
@/lua/ge/extensions/career/modules/testDrive.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not vehicleId then return end
@/lua/ge/extensions/career/modules/logbook.lua
local function onUpdate()
playedLogbookSoundThisFrame = false
@/lua/ge/extensions/gameplay/drift/bounds.lua
local function onUpdate()
isBeingDebugged = gameplay_drift_general.getExtensionDebug("gameplay_drift_bounds")
@/lua/ge/extensions/gameplay/drag/display.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if not gameplay_drag_general then return end
@/lua/ge/extensions/gameplay/traffic/roles/suspect.lua
function C:onUpdate(dt, dtSim)
end
@/lua/ge/extensions/gameplay/drift/stuntZones/donut.lua
function C:onUpdate()
self:sendDecals()
@/lua/ge/extensions/ui/apps/genericMissionData.lua
local function onUpdate()
if not im then return end
@/lua/ge/extensions/core/vehicle/mirror.lua
local function onUpdate(dtReal, dtSim, dtRaw)
@/lua/ge/extensions/gameplay/rally/driveline/drivelineRoute.lua
function C:onUpdate(dtReal, dtSim, dtRaw)
profilerPushEvent("DrivelineRoute - onUpdate")
@/lua/ge/extensions/core/audioRibbon.lua
-- Frame update
local function onUpdate(dtReal, dtSim, dtRaw)
if not ribbons or #ribbons < 1 then
@/lua/ge/extensions/gameplay/drift/stuntZones/nearPole.lua
function C:onUpdate(dtReal, dtSim)
if self.marker then
@/lua/ge/extensions/render/openxr.lua
local logStatePending = false
local function onUpdate(dtReal, dtSim, dtRaw)
if logStatePending then
@/lua/ge/extensions/gameplay/crashTest/crashTestCountdown.lua
local function onUpdate(dtReal, dtSim)
if timer > 0 then
@/lua/ge/extensions/career/modules/playerDriving.lua
local function onUpdate(dtReal, dtSim, dtRaw)
if M.preStart and freeroam_specialTriggers and playerData.traffic then -- this cycles all lights triggers, to eliminate lag spikes (move this code later)
@/lua/ge/extensions/gameplay/drift/quickMessages.lua
local function onUpdate(dt)
if firstOnUpdate then