Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vitals - Fix _woundBloodLoss being used before init #740

Open
wants to merge 1 commit into
base: dev-Tomcat
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading