Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Applevangelist 2025-01-12 17:10:27 +01:00
commit 852c18cef8
2 changed files with 6 additions and 4 deletions

View File

@ -1352,7 +1352,7 @@ CTLD.UnitTypeCapabilities = {
--- CTLD class version.
-- @field #string version
CTLD.version="1.1.22"
CTLD.version="1.1.23"
--- Instantiate a new CTLD.
-- @param #CTLD self
@ -5583,11 +5583,12 @@ end
if PreciseLocation then
randomcoord = zone:GetCoordinate():GetVec2()
end
local randompositions = not PreciseLocation
for _,_template in pairs(temptable) do
self.TroopCounter = self.TroopCounter + 1
local alias = string.format("%s-%d", _template, math.random(1,100000))
self.DroppedTroops[self.TroopCounter] = SPAWN:NewWithAlias(_template,alias)
:InitRandomizeUnits(true,20,2)
:InitRandomizeUnits(randompositions,20,2)
:InitDelayOff()
:SpawnFromVec2(randomcoord)
if self.movetroopstowpzone and type ~= CTLD_CARGO.Enum.ENGINEERS then

View File

@ -1777,7 +1777,8 @@ function UNIT:GetSTN()
local VCN = nil -- VoiceCallsignNumber
local FGL = false -- FlightGroupLeader
local template = self:GetTemplate()
if template.AddPropAircraft then
if template then
if template.AddPropAircraft then
if template.AddPropAircraft.STN_L16 then
STN = template.AddPropAircraft.STN_L16
elseif template.AddPropAircraft.SADL_TN then
@ -1793,6 +1794,6 @@ function UNIT:GetSTN()
if template.datalinks and template.datalinks.SADL and template.datalinks.SADL.settings then
FGL = template.datalinks.SADL.settings.flightLead
end
end
return STN, VCL, VCN, FGL
end