From fdb14cea20a33bd14e4183e10d7fef7ed2b4d0f2 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 29 Apr 2017 13:05:39 -0500 Subject: [PATCH] Fix IvBags in displayPatientInformation --- .../medical/functions/fnc_displayPatientInformation.sqf | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index 2e5a54ee76..79acfda96c 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -77,11 +77,9 @@ if (_show == 1) then { private _totalIvVolume = 0; { - private _value = _target getVariable _x; - if !(isnil "_value") then { - _totalIvVolume = _totalIvVolume + (_target getVariable [_x, 0]); - }; - } foreach EGVAR(medical,IVBags); + _x params ["_xVolumeAdded"]; + _totalIvVolume = _totalIvVolume + _xVolumeAdded; + } foreach (_target getVariable [QEGVAR(medical,ivBags), []]); if (_totalIvVolume >= 1) then { _genericMessages pushback [format[localize ELSTRING(medical,receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]];