Skip to content

Commit 9b1a3e4

Browse files
Merge remote-tracking branch 'origin/master-ng' into develop
# Conflicts: # Moose Development/Moose/Core/Spawn.lua
2 parents 6c32aa6 + bf10196 commit 9b1a3e4

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

Moose Development/Moose/Core/Spawn.lua

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2430,12 +2430,7 @@ function SPAWN:SpawnAtAirbase( SpawnAirbase, Takeoff, TakeoffAltitude, TerminalT
24302430
-- When spawned in the air, we need to generate a Takeoff Event.
24312431
if Takeoff == GROUP.Takeoff.Air then
24322432
for UnitID, UnitSpawned in pairs( GroupSpawned:GetUnits() ) do
2433-
-- BASE:ScheduleOnce forwards its trailing args to the scheduled function as
2434-
-- varargs, so they must NOT be wrapped in a table here (unlike SCHEDULER:New,
2435-
-- which takes a single argument table). Passing a table made it argument #1,
2436-
-- i.e. CreateEventTakeoff ran with that table as `self`, so the takeoff event
2437-
-- never fired and air-spawned groups (e.g. AI_A2A_DISPATCHER GCI defenders)
2438-
-- never activated.
2433+
--SCHEDULER:New( nil, BASE.CreateEventTakeoff, { GroupSpawned, timer.getTime(), UnitSpawned:GetDCSObject() }, 5 ) --No need to create a new SCHEDULER instance every time!
24392434
self:ScheduleOnce(5, BASE.CreateEventTakeoff, GroupSpawned, timer.getTime(), UnitSpawned:GetDCSObject())
24402435
end
24412436
end

0 commit comments

Comments
 (0)