setPath
Definition
-- @/lua/ge/extensions/core/groundMarkers.lua:246
local function setPath(wp, options)
profilerPushEvent("Groundmarkers setFocus")
options = options or {}
M.endWP = nil
-- clear pool
M.decalPoolCount = 0
M.decalPool = {}
M.activeDecalCount = 0
lastGenerationPos = nil
M.clearPathOnReachingTarget = options.clearPathOnReachingTarget
M.stepDistance = options.step or 3
M.color = options.color or M.colorSets[M.colorSet].decals
M.floatingArrowColor = M.colorSets[M.colorSet].arrows
M.cutOffDrivability = options.cutOffDrivability
M.penaltyAboveCutoff = options.penaltyAboveCutoff
M.penaltyBelowCutoff = options.penaltyBelowCutoff
M.renderDecals = options.renderDecals ~= false
M.endWP = (type(wp) == 'table' and wp) or {wp}
if not wp or tableIsEmpty(M.endWP) then
M.routePlanner:clear()
M.endWP = nil
local data = {
markers = {}
}
guihooks.trigger("NavigationGroundMarkersUpdate", data)
else
local veh = getPlayerVehicle(0)
local vehiclePos = vec3(veh and veh:getPosition() or core_camera.getPosition())
local multiPath = {}
table.insert(multiPath, vehiclePos)
for _, w in ipairs(M.endWP) do
if type(w) == 'string' then
if not map.getMap().nodes[w] then
log("W","","Could not find WP to build route! Ignoring WP: " .. dumps(w))
else
table.insert(multiPath, map.getMap().nodes[w].pos)
end
elseif type(w) == 'table' and #w == 3 then
table.insert(multiPath, vec3(w))
else
table.insert(multiPath, w)
end
end
profilerPushEvent("Groundmarkers route setupPath")
M.routePathTmp = multiPath
M.routePlanner:setRouteParams(M.cutOffDrivability, nil, M.penaltyAboveCutoff, M.penaltyBelowCutoff)
M.routePlanner:setupPathMulti(multiPath)
if veh then
M.routePlanner:trackVehicle(veh)
end
profilerPopEvent('Groundmarkers setFocus')
M.sendToApp()
end
core_groundMarkerArrows.createArrowPool(M.floatingArrowColor)
profilerPopEvent('Groundmarkers setPath')
end
Callers
@/lua/ge/extensions/editor/rallyEditor/missionSettings.lua
function C:setPath(path)
self.path = path
@/lua/ge/extensions/editor/rallyEditor/measurementsTab.lua
-- this is the notebook. why am I still calling it a path???
function C:setPath(path)
self.path = path
@/lua/ge/extensions/editor/raceEditor/pathnodes.lua
function C:setPath(path)
self.path = path
@/lua/vehicle/ai.lua
local function setPath(path)
manualPath = path
@/lua/ge/extensions/career/career.lua
end
if core_groundMarkers then core_groundMarkers.setPath(nil) end
@/lua/ge/extensions/editor/raceEditor/startPositions.lua
function C:setPath(path)
self.path = path
@/lua/ge/extensions/editor/crawlEditor/paths.lua
function C:setPath(pathParam)
self.path = pathParam
@/lua/ge/extensions/flowgraph/nodes/gameplay/rally/createRallyGroundMarker.lua
core_groundMarkers.setPath(wps)
extensions.hook('onCreatedRallyGroundMarkerRoute')
@/lua/ge/extensions/editor/crawlEditor/waypoints.lua
function C:setPath(pathParam)
self.path = pathParam
@/lua/ge/extensions/core/hotlapping.lua
raceData = require('/lua/ge/extensions/gameplay/race/race')()
raceData:setPath(pathData)
raceData.lapCount = 1000
@/lua/ge/extensions/career/modules/delivery/general.lua
else
core_groundMarkers.setPath(nil)
freeroam_bigMapMode.resetRoute()
@/lua/ge/extensions/editor/aiTests.lua
end
core_groundMarkers.setPath(path)
end
@/lua/ge/extensions/editor/raceEditor/tools.lua
function C:setPath(path)
self.path = path
@/lua/ge/extensions/gameplay/race/race.lua
path:onDeserialized(json)
self:setPath(path)
end
function C:setPath(path)
self.path = path
@/lua/ge/extensions/editor/raceEditor.lua
for _, window in ipairs(windows) do
currentWindow:setPath(currentPath)
currentWindow:unselect()
for _, window in ipairs(windows) do
currentWindow:setPath(currentPath)
currentWindow:unselect()
raceTestWindowOpen[0] = true
testingWindow:setPath(currentPath)
testingWindow:setupRace()
currentWindow = window
currentWindow:setPath(currentPath)
currentWindow:selected()
pnWindow, segWindow, spWindow, tlWindow, toolsWindow = windows[1], windows[2], windows[3], windows[4], windows[6]
currentWindow:setPath(currentPath)
currentWindow:selected()
M.isVisible = function() return editor.isWindowVisible(toolWindowName) end
M.changedFromExternal = function() currentWindow:setPath(currentPath) end
M.setupRace = setupRace
@/inspector/External/three.js/three.js
var loader = new FileLoader( this.manager );
loader.setPath( this.path );
loader.setResponseType( 'arraybuffer' );
loader.setCrossOrigin( this.crossOrigin );
loader.setPath( this.path );
loader.setCrossOrigin( this.crossOrigin );
loader.setPath( this.path );
var loader = new FileLoader( this.manager );
loader.setPath( this.path );
loader.load( url, function ( text ) {
@/lua/ge/extensions/editor/rallyEditor/pacenotes.lua
function C:setPath(path)
self.path = path
@/lua/ge/extensions/editor/rallyEditor/testTab.lua
function C:setPath(path)
self.path = path
@/lua/ge/extensions/scenario/busdriver.lua
}
core_groundMarkers.setPath(wps, options)
running = true
}
core_groundMarkers.setPath(wps, options)
end
--core_groundMarkers.setPath(nil)
if (not nextStop) or nextStop == "nil" then return end
core_groundMarkers.setPath(wps, 10, 150, 200, vec3Destination, nil, {hex2rgb(currentLine.routeColor)})
--]]
}
core_groundMarkers.setPath(wps, options)
else
markers = {}
core_groundMarkers.setPath(nil)
@/lua/ge/extensions/editor/rallyEditor/recceTab.lua
function C:setPath(path)
self.path = path
@/lua/ge/extensions/editor/raceEditor/timeTrials.lua
function C:setPath(path)
self.path = path
@/lua/ge/extensions/career/modules/inspectVehicle.lua
core_groundMarkers.setPath(nil)
if doesThePlayerHaveToDriveThere then
core_groundMarkers.setPath(parkingSpot.pos)
setTimeToInspectVehicle()
addVehTetherToSalePos()
core_groundMarkers.setPath(nil)
end
@/lua/ge/extensions/core/groundMarkers.lua
}
setPath(wp, options)
end
--cleanup on level exit
setPath(nil)
@/lua/ge/extensions/editor/rallyEditor.lua
currentWindow = window
currentWindow:setPath(currentPath)
currentWindow:selected()
for _, window in ipairs(windows) do
window:setPath(currentPath)
end
for _,win in pairs(windows) do
win:setPath(currentPath)
end
@/lua/ge/extensions/editor/crawlEditor.lua
editor.selectEditMode(editor.editModes.pathEditMode)
paths:setPath(path)
break
if selectedPath then
paths:setPath(selectedPath)
end
local function onPathEditModeDeactivate()
paths:setPath(nil)
paths:selectPathnode(nil)
paths:setPath(selectedPath)
paths:drawPathnodeSelectionIndicators(mouseInfo)
@/lua/ge/extensions/editor/rallyEditor/drivelineTab.lua
function C:setPath(path)
-- Check if we're switching to a different mission
@/gameplay/missionTypes/aiRace/customNodes/activateRaceNode.lua
self.race = require('/lua/ge/extensions/gameplay/race/race')()
self.race:setPath(self.pinIn.pathData.value)
self.race.path.config.rollingStart = self.pinIn.rolling.value
@/lua/ge/extensions/editor/raceEditor/trackLayout.lua
function C:setPath(path)
self.path = path
@/lua/ge/extensions/career/modules/delivery/vehicleTasks.lua
local destinationPos = dGenerator.getParkingSpotByPath(activeTaskStep.destination.psPath).pos
core_groundMarkers.setPath(destinationPos, {clearPathOnReachingTarget = false})
elseif activeTaskStep.type == "enterVehicle" or activeTaskStep.type == "coupleTrailer" then
if veh then
core_groundMarkers.setPath(veh:getPosition(), {clearPathOnReachingTarget = false})
end
@/lua/ge/extensions/editor/rallyEditor/notebookInfo.lua
function C:setPath(path)
self.path = path
@/lua/ge/extensions/career/modules/vehicleShopping.lua
-- TODO this should better take vec3s directly
core_groundMarkers.setPath(vec3(pos.x, pos.y, pos.z))
guihooks.trigger('ChangeState', {state = 'play', params = {}})
@/gameplay/missionTypes/chase/customNodes/suspectAiNode.lua
local race = require('/lua/ge/extensions/gameplay/race/race')()
race:setPath(path)
if race.aiPath and race.aiPath[1] then
@/lua/ge/extensions/editor/raceEditor/segments.lua
function C:setPath(path)
self.path = path
@/lua/ge/extensions/freeroam/bigMapMode.lua
navDestinationForLuaReloads = pos
core_groundMarkers.setPath(pos, {clearPathOnReachingTarget = true})
resetRoute()
@/lua/ge/extensions/editor/raceEditor/testing.lua
function C:setPath(path)
self.path = path
self.race = require('/lua/ge/extensions/gameplay/race/race')()
self.race:setPath(self.path)
self.race.lapCount = oldLap
@/lua/ge/extensions/career/modules/delivery/cargoScreen.lua
if tableIsEmpty(allCargo) then
core_groundMarkers.setPath(nil)
freeroam_bigMapMode.resetRoute()
if not hasTargetableCargo then
core_groundMarkers.setPath(nil)
freeroam_bigMapMode.resetRoute()
getClosestNeighbor("player", deepcopy(targetsById), result, onlyClosestTarget)
core_groundMarkers.setPath(result, {clearPathOnReachingTarget = false})
freeroam_bigMapMode.resetRoute()
@/lua/ge/extensions/ui/uiNavi.lua
local function route_start (wp, pos)
core_groundMarkers.setPath(wp)
destination = wp
destinationPos = nil
core_groundMarkers.setPath(nil)
guihooks.trigger('RouteUpdate', {})
if oldPos:distance(newPos) > 0.1 then
core_groundMarkers.setPath(destination)
guihooks.trigger('RouteUpdate', route) -- TODO: convert into stream
@/lua/ge/extensions/flowgraph/nodes/gameplay/race/fileRace.lua
self.race = require('/lua/ge/extensions/gameplay/race/race')()
self.race:setPath(self.pinIn.pathData.value)
self.race.path.config.rollingStart = self.pinIn.rolling.value
@/lua/ge/extensions/flowgraph/nodes/gameplay/groundmarkers.lua
end
core_groundMarkers.setPath(target, options)
end
@/lua/ge/extensions/editor/rallyEditor/static.lua
-- this is the notebook. why am I still calling it a path???
function C:setPath(path)
self.path = path
@/lua/ge/extensions/campaign/exploration.lua
if not poi then
core_groundMarkers.setPath(nil)
destinationMarker:hide()
if poiRoadData and poiRoadData.best then
core_groundMarkers.setPath(poiRoadData.best)
end
destinationMarker = nil
core_groundMarkers.setPath(nil)
ui_missionInfo.closeDialogue()
@/lua/ge/extensions/editor/raceEditor/pacenotes.lua
function C:setPath(path)
self.path = path