fix: frontkrybning tillader 3 m sideværts (v1.62.82)
This commit is contained in:
@@ -12,6 +12,8 @@ ADHitchCreep.ROOMY_ATTACH_DISTANCE = 3 -- m: ADHitch's rummelige koblingsforsø
|
||||
ADHitchCreep.DIRECT_ATTACH_DISTANCE = 1.0
|
||||
ADHitchCreep.CREEP_MAX_DISTANCE = 12 -- m: længere væk end det bakkes ikke (in-game 6/10: AD holdt 9-10 m før River 1 / Plov 1)
|
||||
ADHitchCreep.CREEP_MAX_LATERAL = 1.5 -- m til siden: mere end det rammer en lige bakning ikke trækøjet
|
||||
-- frem til et frontredskab styres der mod koblingspunktet hele vejen (in-game 8/10: KDF 341 11,1 m foran, 1,8 m til siden)
|
||||
ADHitchCreep.CREEP_MAX_LATERAL_FRONT = 3
|
||||
ADHitchCreep.CREEP_TIMEOUT_MS = 35000
|
||||
ADHitchCreep.CREEP_SPEED = 2 -- km/t
|
||||
ADHitchCreep.AWAY_TOLERANCE = 1 -- m: længere væk end ved start = den bakker forkert
|
||||
@@ -26,7 +28,8 @@ function ADHitchCreep.plan(offset, front)
|
||||
local distance = math.sqrt(offset.x ^ 2 + offset.z ^ 2)
|
||||
if distance <= ADHitchCreep.DIRECT_ATTACH_DISTANCE then return "attach" end
|
||||
local wrongSide = (front and offset.z <= 0) or (not front and offset.z >= 0)
|
||||
if wrongSide or distance > ADHitchCreep.CREEP_MAX_DISTANCE or math.abs(offset.x) > ADHitchCreep.CREEP_MAX_LATERAL then
|
||||
local maxLateral = front and ADHitchCreep.CREEP_MAX_LATERAL_FRONT or ADHitchCreep.CREEP_MAX_LATERAL
|
||||
if wrongSide or distance > ADHitchCreep.CREEP_MAX_DISTANCE or math.abs(offset.x) > maxLateral then
|
||||
return "none"
|
||||
end
|
||||
return "creep"
|
||||
|
||||
Reference in New Issue
Block a user