Repository navigation
Conversation
Ignore an invalid ACE barometric pressure for that tick and recover PaO2 from a nil or NaN stored value, so one bad tick cannot break the unit's SpO2 and feedback effects for the rest of the session. Fixes KAT-Advanced-Medical#873 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Andx667
marked this pull request as ready for review
November 23, 2026 13:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When merged this pull request will:
handleEffectsfor the rest of the sessionFixes #873
Cause
On a client joining in progress, the first vitals tick can run before ACE common's postInit:
ace_weather_fnc_calculateBarometricPressuredepends onace_common_mapAltitude, which has no preInit default and is only set in ACE common's postInit.CBA_missionTimeearly, so it passes the 1-second vitals check. A client present at mission start stays near 0 and does not.PaO2 is calculated from its previous value, so the single nil then carries forward on every tick, even after the inputs are valid again.
Evidence
The client RPT from the reporter (KAM 3.2.1, ACE 3.21.2, CBA 3.19.0,
didJIP=true) shows:handleOxygenFunctionerror is at line 1160, and PostInit starts at line 1175 with mission time already at 371 s.bloodGasstays[40, any, NaN, 24, 7.4, 37], causing 189handleEffectserrors.bloodGasis most likely being broadcast as well.The RPT does not print
ace_common_mapAltitudeitself, so that variable is inferred from the init order and the ACE source.Testing
hemtt checkpasses, with no warnings in the changed filesIMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}.🤖 Generated with Claude Code