Skip to content

Airway - Fix undefined KAT_forceWakeup on unconsciousness - #877

Open
Andx667 wants to merge 1 commit into
KAT-Advanced-Medical:dev-Tomcatfrom
Andx667:fix/airway-forcewakeup-default
Open

Andx667 wants to merge 1 commit into
KAT-Advanced-Medical:dev-Tomcatfrom
Andx667:fix/airway-forcewakeup-default

Conversation

@Andx667

@Andx667 Andx667 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

When merged this pull request will:

  • Initialise KAT_forceWakeup to false in preInit, so the ace_unconscious handler can no longer read it undefined

Cause

The flag was first set in kat_airway_fnc_init, which exits on machines where the unit is not local. Toggling unconsciousness through the ACE Zeus module on a build before #854 logged:

Error position: <KAT_forceWakeup) exitWith {};
Error Undefined variable in expression: kat_forcewakeup
File \x\kat\addons\airway\XEH_postInit.sqf..., line 29

#854 made non-owner machines exit the handler first, which removes the common case. A machine that receives a unit through a locality transfer without having initialised a local unit, such as a headless client taking over AI, can still reach this read.

Testing

  • hemtt check passes

IMPORTANT

  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

🤖 Generated with Claude Code

Initialise the flag in preInit. It was only set when a unit initialised
locally, so a machine receiving a unit through a locality transfer could
read it undefined in the ace_unconscious handler.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Andx667
Andx667 marked this pull request as ready for review November 23, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant