From 9dd060f021112514ef6e4ea4a8fb18bd5e026b9f Mon Sep 17 00:00:00 2001 From: nobodyshome Date: Mon, 3 Mar 2025 08:00:25 +0000 Subject: [PATCH] Fix _woundBloodLoss being used before init --- addons/vitals/functions/fnc_handleUnitVitals.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/vitals/functions/fnc_handleUnitVitals.sqf b/addons/vitals/functions/fnc_handleUnitVitals.sqf index 53627bf50..2cc5cadbf 100644 --- a/addons/vitals/functions/fnc_handleUnitVitals.sqf +++ b/addons/vitals/functions/fnc_handleUnitVitals.sqf @@ -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];