detectStart
Definition
-- @/lua/ge/extensions/gameplay/drift/freeroam/driftSpots.lua:236
-- "Proper" end means going through the finish line, not out of bounds or wrong way
local function detectStart(lineId)
local line = lines[lineId]
if not line then
log("E","","Could not find drift line with id " .. dumps(lineId))
return
end
if isInFreeroamChallenge then
return
end
if isPointInsideRectangle(plPos, line.pos, line.scl, line.rot) then
local dot = plVel:dot(line.startDir)
if dot > 0 then
if gameplay_drift_drift.getIsDrifting() then
startDriftSpot(line)
end
end
end
end
Callers
@/lua/ge/extensions/gameplay/drift/freeroam/cruising.lua
local function detectStart()
if gameplay_drift_general.getContext() == "inFreeroam" and gameplay_drift_drift.getCurrentDriftDuration() >= driftDuration and gameplay_drift_drift.getDriftChainChainedDrifts() >= minDriftChain then
detectStart()
detectEnd(dtSim)
@/lua/ge/extensions/gameplay/markers/driftLineMarker.lua
local drift = gameplay_drift_freeroam_driftSpots
drift.detectStart(self.lineId)
end