startCrawlFreeroam
Definition
-- @/lua/ge/extensions/gameplay/crawl/general.lua:95
local function startCrawlFreeroam(trail, veh)
if not trail or not veh then
log('E', logTag, 'Cannot start crawl: no valid trail data')
return
end
if M.activeTrail then
gameplay_crawl_utils.stopCrawl(true)
crawlersData = {}
end
if not setupCrawl(trail, veh, false) then
log('E', logTag, 'Failed to setup crawl')
return
end
local crawlerData = crawlersData[1]
if not crawlerData then
log('E', logTag, 'No crawler data found after setup')
return
end
if gameplay_crawl_utils.startCrawl(veh:getID(), trail, crawlerData, false) then
extensions.hook('onCrawlStarted')
end
end
Callers
@/lua/ge/extensions/gameplay/crawl/general.lua
if veh then
startCrawlFreeroam(trail, veh)
end