Skip to content

Commit

Permalink
Improve BVM effectiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
BlueTheKing committed Oct 1, 2024
1 parent c103782 commit 185b4f6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addons/core/overrides/fnc_handleUnitVitals.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ switch (true) do {
_unit setVariable [QEGVAR(circulation,CardiacArrest_TargetRhythm), ACM_Rhythm_VF];
[QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent;
};
case (_bloodPressureL >= 190): {
case (_bloodPressureL > 190): {
TRACE_2("bloodPressure L above limits",_unit,_bloodPressureL);
_unit setVariable [QEGVAR(circulation,CardiacArrest_TargetRhythm), ACM_Rhythm_PVT];
[QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent;
Expand Down
2 changes: 1 addition & 1 deletion addons/core/overrides/fnc_updateHeartRate.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if (IN_CRDC_ARRST(_unit) || alive (_unit getVariable [QACEGVAR(medical,CPR_provi
// Increase HR to compensate for low blood oxygen/higher oxygen demand (e.g. running, recovering from sprint)
private _oxygenDemand = _unit getVariable [VAR_OXYGEN_DEMAND, 0];
private _missingOxygen = (ACM_TARGETVITALS_OXYGEN(_unit) - _oxygenSaturation);
private _targetOxygenHR = _targetHR + ((_missingOxygen * (linearConversion [5, 20, _missingOxygen, 0, 5, true])) max (_oxygenDemand * -2000));
private _targetOxygenHR = _targetHR + ((_missingOxygen * (linearConversion [5, 20, _missingOxygen, 0, 3.7, true])) max (_oxygenDemand * -2000));
_targetOxygenHR = _targetOxygenHR min ACM_TARGETVITALS_MAXHR(_unit);

_targetHR = _targetHR max _targetOxygenHR;
Expand Down
6 changes: 3 additions & 3 deletions addons/core/overrides/fnc_updateOxygen.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ switch (true) do {
private _cardiacEffect = 1.1 min ((DEFAULT_PERIPH_RES / (_unit getVariable [VAR_PERIPH_RES, DEFAULT_PERIPH_RES]))) max 0.8;

if (_heartRate > ACM_TARGETVITALS_HR(_unit)) then {
_cardiacEffect = _cardiacEffect * ([(linearConversion [ACM_TARGETVITALS_HR(_unit), 190, _heartRate, 1, 1.4, true]),(linearConversion [(ACM_TARGETVITALS_MAXHR(_unit) - 5), (ACM_TARGETVITALS_MAXHR(_unit) + 2), _heartRate, 1.4, 1])] select (_heartRate > 190));
_cardiacEffect = _cardiacEffect * ([(linearConversion [ACM_TARGETVITALS_HR(_unit), 190, _heartRate, 1, 1.5, true]),(linearConversion [(ACM_TARGETVITALS_MAXHR(_unit) - 5), (ACM_TARGETVITALS_MAXHR(_unit) + 2), _heartRate, 1.5, 1])] select (_heartRate > 190));
} else {
_cardiacEffect = _cardiacEffect * (linearConversion [(ACM_TARGETVITALS_HR(_unit) - 10), 40, _heartRate, 1, 0.8, true]);
};
Expand All @@ -142,11 +142,11 @@ switch (true) do {
if (IN_CRDC_ARRST(_unit)) then {
_breathingEffectiveness = _breathingEffectiveness * 1.2;
} else {
_breathingEffectiveness = _breathingEffectiveness * 1.25;
_breathingEffectiveness = _breathingEffectiveness * 1.3;
};

if (_BVMOxygenAssisted) then {
_breathingEffectiveness = _breathingEffectiveness * 1.5;
_breathingEffectiveness = _breathingEffectiveness * 1.6;
};
};

Expand Down

0 comments on commit 185b4f6

Please sign in to comment.