ACE3/addons/medical/functions/fnc_isInStableCondition.sqf

25 lines
466 B
Plaintext
Raw Normal View History

/*
* Author: Glowbal
* Check if a unit is in a stable condition
*
* Arguments:
* 0: The patient <OBJECT>
*
* Return Value:
* Is in stable condition <BOOL>
*
* Public: No
*/
#include "script_component.hpp"
2015-08-22 14:25:10 +00:00
params ["_unit"];
private _totalBloodLoss = 0;
{
// total bleeding ratio * percentage of injury left
_totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3));
} forEach (_unit getVariable [QGVAR(openWounds), []]);
(_totalBloodLoss == 0);