mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-07-16 14:12:47 +00:00
edf70e971cd8769ee3a8b705012378caf4adcdff
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>
You can find documentation for MOOSE in the following places:
- Generated documentation of all MOOSE classes:
- For the
master-ngbranch: MOOSE_DOCS - For the
developbranch: MOOSE_DOCS_DEVELOP
- For the
- Documentation:
- The old Guides can be found in our archive.
- Visit our new documentation at the MOOSE GitHub page.
- Overview of all MOOSE repositories on GitHub.
Description
Languages
Lua
99.9%