2015-02-08 09:01:32 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Calculates the blood volume change and decreases the IVs given to the unit.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* ReturnValue:
|
2015-08-22 14:25:10 +00:00
|
|
|
* 0: BloodPressure Low <NUMBER>
|
|
|
|
* 1: BloodPressure High <NUMBER>
|
2015-02-07 22:55:48 +00:00
|
|
|
*
|
2015-02-08 09:01:32 +00:00
|
|
|
* Public: No
|
2015-02-07 22:55:48 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-22 14:25:10 +00:00
|
|
|
// Value is taken because with cardic output and resistance at default values, it will put blood pressure High at 120.
|
2015-02-07 22:55:48 +00:00
|
|
|
#define MODIFIER_BP_HIGH 0.229
|
|
|
|
|
2015-08-22 14:25:10 +00:00
|
|
|
// Value is taken because with cardic output and resistance at default values, it will put blood pressure Low at 80.
|
2015-02-07 22:55:48 +00:00
|
|
|
#define MODIFIER_BP_LOW 0.1524
|
|
|
|
|
2015-08-22 14:25:10 +00:00
|
|
|
params ["_unit"];
|
|
|
|
|
2016-06-13 00:34:56 +00:00
|
|
|
private _cardiacOutput = [_unit] call FUNC(getCardiacOutput);
|
|
|
|
private _resistance = _unit getVariable [QGVAR(peripheralResistance), 100];
|
2015-02-07 22:55:48 +00:00
|
|
|
|
2016-06-13 00:34:56 +00:00
|
|
|
private _bloodPressureHigh = (_cardiacOutput * MODIFIER_BP_HIGH) * _resistance;
|
|
|
|
private _bloodPressureLow = (_cardiacOutput * MODIFIER_BP_LOW) * _resistance;
|
2015-02-07 22:55:48 +00:00
|
|
|
|
2015-08-29 20:53:08 +00:00
|
|
|
[_bloodPressureLow max 0, _bloodPressureHigh max 0]
|