fix(bredde): spreder/sprøjte under 1,5 m målt -> spray-typens faste bredde for rollens vare (K105) (v1.62.241)

This commit is contained in:
2026-10-16 02:38:43 +02:00
parent 224ab8f0f3
commit 2145514878
5 changed files with 60 additions and 6 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ local function looseImplement(adEnv, role, x, z, required, roleAccept, only)
parkedExists = true
elseif ADFieldJobs.state.assignments[id] == nil and not ADPool.isReserved(id)
and (roleAccept == nil or roleAccept({role = own, roles = roles, vehicle = vehicle}))
and ADFieldModel.checkWidth(role, ADCpBridge.getWorkWidth(vehicle) or 0, required) then
and ADFieldModel.checkWidth(role, ADCpBridge.getWorkWidth(vehicle, role) or 0, required) then
local vx, _, vz = getWorldTranslation(vehicle.rootNode)
local d = (vx - x) ^ 2 + (vz - z) ^ 2
if bestD == nil or d < bestD then best, bestD = vehicle, d end