Skip to content

Commit

Permalink
BSM: do not hold empty vehicles
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel32019 committed Jun 15, 2024
1 parent be030ea commit 4ac2f9b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/Manager/BunkerSiloManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ function ADBunkerSiloManager:update(dt)
if triggerX ~= nil then
local distance = MathUtil.vector2Length(triggerX - vehicleX, triggerZ - vehicleZ)
if distance < bsmRange then
if AutoDrive.isVehicleInBunkerSiloArea(vehicle) or bunkerSilo.adClosestVehicle == vehicle then
local fillLevel, _, _, _ = AutoDrive.getAllFillLevels(AutoDrive.getAllUnits(vehicle))
if AutoDrive.isVehicleInBunkerSiloArea(vehicle)
or bunkerSilo.adClosestVehicle == vehicle
or fillLevel < 0.1
then
-- IMPORTANT: DO NOT SET setUnPaused to avoid crash with CP silo compacter !!!
-- vehicle.ad.drivePathModule:setUnPaused()
else
Expand Down

0 comments on commit 4ac2f9b

Please sign in to comment.