fix(rute): AD-rutesøgning springes over uden frontNode — ingen scriptfejl (v1.62.273)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user