fix: guard vejnet-afstand (køretøjer uden getClosestWayPoint), kun motoriserede køretøjer i listen (v1.9.5.0)

This commit is contained in:
2026-09-23 01:24:17 +02:00
parent a97327e993
commit ee230ae248
3 changed files with 12 additions and 3 deletions
+1
View File
@@ -86,6 +86,7 @@ local function makeVehicle(uniqueId, name, carriable, capacity, x, z)
getName = function() return name end,
getOwnerFarmId = function() return 1 end,
startAutoDrive = function(self) self.ad.stateModule.active = true; self.started = (self.started or 0) + 1 end,
getClosestWayPoint = function() return nil, 0 end,
stopAutoDrive = function(self) self.ad.stateModule.active = false; self.stopped = (self.stopped or 0) + 1 end,
ad = {stateModule = stateModule, settings = {rotateTargets = {values = {1, 2, 3, 4}, current = 1, new = 1, isVehicleSpecific = true}}},
}