From ae0d68f5efb826ffab83a5615b2b6ff2cc8398c8 Mon Sep 17 00:00:00 2001 From: RndName Date: Sun, 8 May 2022 11:23:07 +0200 Subject: [PATCH] Use transportLimit for unknown numberOrTemplate Instead of directly using the numberOfTroops it should first check for the actual transport limit (if defined) for the given helo type. Otherwise the unitLoadLimits would be ignored for all AI flights automatically loading troops in pickup zones. --- CTLD.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CTLD.lua b/CTLD.lua index 1791a50..0e091b4 100644 --- a/CTLD.lua +++ b/CTLD.lua @@ -2121,7 +2121,7 @@ function ctld.loadTroops(_heli, _troops, _numberOrTemplate) --number doesnt apply to vehicles if _numberOrTemplate == nil or (type(_numberOrTemplate) ~= "table" and type(_numberOrTemplate) ~= "number") then - _numberOrTemplate = ctld.numberOfTroops + _numberOrTemplate = ctld.getTransportLimit(_heli:getTypeName()) end if _onboard == nil then