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.
This commit is contained in:
RndName
2022-05-08 11:23:07 +02:00
parent f70c6a7131
commit ae0d68f5ef

View File

@@ -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