fix(rute): AD-rutesøgning springes over uden frontNode — ingen scriptfejl (v1.62.273)

This commit is contained in:
2026-10-16 17:23:53 +02:00
parent fb0e06f027
commit 0760410729
3 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -192,7 +192,10 @@ end
local function computeRoute(adEnv, vehicle, wayPointId)
local graph = adEnv.ADGraphManager
if pathReaches(graph:getPathTo(vehicle, wayPointId), wayPointId) then
-- AD's getPathTo kræver vehicle.ad.frontNode (findMatchingWayPointForVehicle); uden den giver motoren en
-- scriptfejl i loggen, selv i pcall (in-game 16/10: foderkøb via findBuyMarker) — så kun graf-tjekket
local noFront = vehicle.ad ~= nil and vehicle.ad.frontNode == nil
if not noFront and pathReaches(graph:getPathTo(vehicle, wayPointId), wayPointId) then
return true
end
if graphReaches(adEnv, vehicle, wayPointId) then
+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.272.0</version>
<version>1.62.273.0</version>
<title>
<en>AD Smart Pickup</en>
</title>