Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Commit

Permalink
Update fn_adjustSpo2.sqf
Browse files Browse the repository at this point in the history
  • Loading branch information
Katalam committed Mar 3, 2019
1 parent c28841a commit 9f5dccf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions addons/kat_acebreathing/functions/fn_adjustSpo2.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@ params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_add", true, [true]
private _newValue = 0;
private _oldValue = _unit getVariable ["ace_medical_airwayStatus", 100];
_value = _value / 100;
if (_oldValue <= 65) exitWith {
_unit setVariable ["ace_medical_airwayStatus", 65, true];
65;
};

if (_add) then {
_newValue = _oldValue + _value;
_unit setVariable ["ace_medical_airwayStatus", _newValue, true];
} else {
_newValue = _oldValue - _value;
if (_newValue < 65) then {_newValue = 65};
_unit setVariable ["ace_medical_airwayStatus", _newValue, true];
};

Expand Down

0 comments on commit 9f5dccf

Please sign in to comment.