2018-07-30 09:22:14 +00:00
|
|
|
#include "script_component.hpp"
|
2015-02-08 09:01:32 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Calculate the total blood loss of a unit.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The Unit <OBJECT>
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Return Value:
|
2019-06-10 16:23:21 +00:00
|
|
|
* Total blood loss of unit (litres/second) <NUMBER>
|
2015-02-07 22:55:48 +00:00
|
|
|
*
|
2017-04-22 15:57:32 +00:00
|
|
|
* Example:
|
2019-04-27 19:12:11 +00:00
|
|
|
* [player] call ace_medical_status_fnc_getBloodLoss
|
2017-04-22 15:57:32 +00:00
|
|
|
*
|
2015-02-08 09:01:32 +00:00
|
|
|
* Public: No
|
2015-02-07 22:55:48 +00:00
|
|
|
*/
|
|
|
|
|
2015-08-22 14:25:10 +00:00
|
|
|
params ["_unit"];
|
2015-02-07 22:55:48 +00:00
|
|
|
|
2019-04-27 19:12:11 +00:00
|
|
|
private _woundBleeding = GET_WOUND_BLEEDING(_unit);
|
|
|
|
if (_woundBleeding == 0) exitWith {0};
|
2016-12-09 14:54:33 +00:00
|
|
|
|
|
|
|
private _cardiacOutput = [_unit] call FUNC(getCardiacOutput);
|
2015-02-13 21:55:13 +00:00
|
|
|
|
2019-06-28 00:01:20 +00:00
|
|
|
// even if heart stops blood will still flow slowly (gravity)
|
|
|
|
(_woundBleeding * (_cardiacOutput max 0.05) * EGVAR(medical,bleedingCoefficient))
|