Skip to content

Commit

Permalink
Fix _woundBloodLoss being used before init
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodyshome committed Mar 3, 2025
1 parent 8618572 commit 9dd060f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/vitals/functions/fnc_handleUnitVitals.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,12 @@ if (EGVAR(breathing,enable)) then {
_spo2 = [_unit, _heartRate, _anerobicPressure, _bloodGas, _temperature, _baroPressure, _opioidDepression, _deltaT, _syncValues] call FUNC(handleOxygenFunction);
};

private _woundBloodLoss = GET_WOUND_BLEEDING(_unit);

// Vasoconstriction from Wound Blood Loss and Alpha Adjustment
_vasoconstriction = 1 + (0.5 * _woundBloodLoss) + _alphaFactorAdjustment;
_unit setVariable [VAR_VASOCONSTRICTION, (1.8 min (0.2 max _vasoconstriction)), _syncValues];

private _woundBloodLoss = GET_WOUND_BLEEDING(_unit);

private _bloodPressure = [_unit] call EFUNC(circulation,getBloodPressure);
_unit setVariable [VAR_BLOOD_PRESS, _bloodPressure, _syncValues];
Expand Down

0 comments on commit 9dd060f

Please sign in to comment.