Geoff Franks edf70e971c fix(Spawn): air-spawn takeoff event never fired (wrong arg packing)
SPAWN:SpawnAtAirbase scheduled the synthetic takeoff event for air-spawned
groups with:

    self:ScheduleOnce(5, BASE.CreateEventTakeoff,
                      {GroupSpawned, timer.getTime(), UnitSpawned:GetDCSObject()})

BASE:ScheduleOnce(Start, SchedulerFunction, ...) forwards its trailing
arguments to the scheduled function as varargs (it wraps `...` in a table
internally). Wrapping the arguments in a table here made that table argument
number one, so CreateEventTakeoff ran with the {group, time, dcs} table as
`self`. A plain table has no :F(), the very first line errored, and the
S_EVENT_TAKEOFF event was never raised. Air-spawned AI_A2A_DISPATCHER GCI
defenders therefore never activated (observed: zero QRA scrambled with
takeoff = Air).

The sibling call site in SpawnAtParkingSpot is correct because it uses
SCHEDULER:New(nil, fn, {args}, 5), which DOES take a single argument table.
Drop the braces so the args pass as varargs, matching CreateEventTakeoff's
(self=group, EventTime, Initiator) signature.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 21:02:40 -04:00
2026-03-24 12:29:42 +01:00
2026-02-08 14:48:51 +01:00
2021-10-27 20:18:10 -07:00
2026-04-12 12:56:15 +02:00
2023-10-27 17:01:51 +02:00
2024-01-10 15:40:46 +01:00
2018-02-26 10:02:48 +01:00
2021-04-22 10:10:59 +02:00
2016-09-04 10:52:44 +02:00
2026-03-23 06:20:18 +01:00

Moose-Includes

MOOSE

You can find documentation for MOOSE in the following places:


S
Description
No description provided
Readme GPL-3.0 530 MiB
Languages
Lua 99.9%