fix: frontkrybning tillader 3 m sideværts (v1.62.82)

This commit is contained in:
2026-10-08 10:07:18 +02:00
parent eee2e713f1
commit 8f7ad08d91
3 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -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"
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<modDesc descVersion="107">
<author>masterdraco</author>
<version>1.62.81.0</version>
<version>1.62.82.0</version>
<title>
<en>AD Smart Pickup</en>
</title>