From 9def2f1a3acc29fc7969dd5db5569a360a29b449 Mon Sep 17 00:00:00 2001 From: FullGas1 Date: Tue, 25 Mar 2025 17:00:17 +0100 Subject: [PATCH] fixes --- CTLD.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CTLD.lua b/CTLD.lua index b7b59fb..991c323 100644 --- a/CTLD.lua +++ b/CTLD.lua @@ -2029,8 +2029,8 @@ function ctld.repackVehicle(_params, t) -- scan rrs table 'repackRequestsStack' if repackableUnit then if repackableUnit:isExist() then --ici calculer le heading des spwans à effectuer - for i = 1, v[1].cratesRequired do - local _point = { x = spawnRefPoint.x + (i * 5), z = spawnRefPoint.z } + for i = 0, v[1].cratesRequired - 1 do + local _point = { x = spawnRefPoint.x + 5 + (i * 3), z = spawnRefPoint.z } -- see to spawn the crate at random position heading the transport unit with ctld.getPointAtDirection(_unit, _offset, _directionInRadian) local _unitId = ctld.getNextUnitId() local _name = string.format("%s_%i", v[1].desc, _unitId) @@ -2113,7 +2113,7 @@ function ctld.updateDynamicLogisticUnitsZones() -- remove Dynamic Logistic Units end end end - return 5 -- reschedule the function in 5 second + return 5 -- reschedule the function in 5 seconds end -- ***************************************************************