Skip to content

Commit

Permalink
Fix blood bags not showing in medical menu (#4351)
Browse files Browse the repository at this point in the history
fix #4306
  • Loading branch information
PabstMirror authored and thojkooi committed Sep 6, 2016
1 parent 4781903 commit a320a56
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions addons/medical_menu/functions/fnc_updateUIInfo.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ if (_target getVariable [QEGVAR(medical,hasPain), false]) then {
};

_totalIvVolume = 0;
private _bloodBags = _target getVariable [QEGVAR(medical,ivBags), []];
{
private _value = _target getVariable _x;
if (!isNil "_value") then {
_totalIvVolume = _totalIvVolume + (_target getVariable [_x, 0]);
};
} count EGVAR(medical,IVBags);
_x params ["_bagVolumeRemaining"];
_totalIvVolume = _totalIvVolume + _bagVolumeRemaining;
} foreach _bloodBags;

if (_totalIvVolume >= 1) then {
_genericMessages pushBack [format [localize ELSTRING(medical,receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]];
Expand Down

0 comments on commit a320a56

Please sign in to comment.