diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml index a88e765..a16d922 100644 --- a/.gitea/workflows/pr.yml +++ b/.gitea/workflows/pr.yml @@ -57,11 +57,13 @@ jobs: globals = { "env", "net", "trigger", "timer", "Object", "land", "coord", "coalition", "Unit", "Group", "Airbase", "StaticObject", "SceneryObject", "world", - "country", "missionCommands", "Controller", "Weapon", "atmosphere", "country" + "country", "missionCommands", "Controller", "Weapon", "atmosphere", "country", + "lfs", "AI" } } std = "lua51c+spearhead_lib+dcs_lib" + self = false max_line_length = false EOF diff --git a/src/classes/helpers/SpawnManager.lua b/src/classes/helpers/SpawnManager.lua index 1ac88c9..76b33de 100644 --- a/src/classes/helpers/SpawnManager.lua +++ b/src/classes/helpers/SpawnManager.lua @@ -125,8 +125,6 @@ do --- privates end local spawnTemplate = Util.deepCopyTable(spawnData.groupTemplate) - ---@type Array - local removeableUnitNames = {} --[[ TODO: Spawn units at "current"/LastKnown position with them going to the next waypoint. ONLY when perstable data is found. @@ -138,12 +136,6 @@ do --- privates local name = unit["name"] --[[@as string]] SpearheadEvents.addOnUnitLostEventListener(name, self) - local state = Persistence.UnitState(name) - if state then - if state.isDead == true then - removeableUnitNames[#removeableUnitNames+1] = name - end - end if override and override.emptyLoadouts == true then if unit["payload"] and unit["payload"]["pylons"] then @@ -171,7 +163,6 @@ do --- privates local group = coalition.addGroup(country, spawnData.category, spawnTemplate) - for _, unit in pairs(group:getUnits()) do self:CheckUnitAndReplaceIfPersistentDead(unit) if isPersistent == true then