2016-12-01 19:54:03 +00:00
|
|
|
/*
|
|
|
|
* Author: BaerMitUmlaut
|
2017-01-29 19:24:16 +00:00
|
|
|
* Handles any visual effects of medical.
|
|
|
|
* Note: Heart beat sounds run in a different PFH - see fnc_effectHeartBeat.
|
2016-12-01 19:54:03 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
private _disableAll = (!isNull curatorCamera) || {!alive ACE_player};
|
|
|
|
if (_disableAll) exitWith {
|
2016-12-09 18:16:41 +00:00
|
|
|
[false, 0] call FUNC(effectUnconscious);
|
|
|
|
[false] call FUNC(effectPain);
|
|
|
|
[false] call FUNC(effectBloodVolume);
|
2017-01-17 20:35:53 +00:00
|
|
|
[false] call FUNC(effectBleeding);
|
2016-12-01 19:54:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// - Current state info -------------------------------------------------------
|
|
|
|
private _bleedingStrength = [ACE_player] call EFUNC(medical,getBloodloss);
|
|
|
|
private _bleeding = _bleedingStrength > 0;
|
2016-12-08 20:30:53 +00:00
|
|
|
private _bloodVolume = ACE_player getVariable [QEGVAR(medical,bloodVolume), DEFAULT_BLOOD_VOLUME];
|
2016-12-01 19:54:03 +00:00
|
|
|
private _unconscious = ACE_player getVariable [QEGVAR(medical,isUnconscious), false];
|
2016-12-09 18:59:46 +00:00
|
|
|
private _heartRate = ACE_player getVariable [QEGVAR(medical,heartRate), DEFAULT_HEART_RATE];
|
|
|
|
private _pain = [ACE_player] call EFUNC(medical,getPainLevel);
|
2016-12-01 19:54:03 +00:00
|
|
|
|
|
|
|
// - Visual effects -----------------------------------------------------------
|
2016-12-09 18:16:41 +00:00
|
|
|
[_unconscious, 2] call FUNC(effectUnconscious);
|
2016-12-09 18:14:12 +00:00
|
|
|
[
|
|
|
|
true, linearConversion [BLOOD_VOLUME_CLASS_2_HEMORRHAGE, BLOOD_VOLUME_CLASS_4_HEMORRHAGE, _bloodVolume, 0, 1, true]
|
|
|
|
] call FUNC(effectBloodVolume);
|
2016-12-09 18:15:44 +00:00
|
|
|
|
|
|
|
if (!_unconscious) then {
|
|
|
|
[true, _pain] call FUNC(effectPain);
|
|
|
|
};
|
2017-01-17 20:35:53 +00:00
|
|
|
|
|
|
|
[true, _bleedingStrength] call FUNC(effectBleeding);
|