From c2f7366d32376bb63db6960c876d56b0887eedaa Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 10 Oct 2016 17:46:17 +0200 Subject: [PATCH] blood volume unit vitals --- addons/medical/functions/fnc_handleUnitVitals.sqf | 6 +++--- addons/medical/script_macros_medical.hpp | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index b01b1d9aee..5398b1429e 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -72,12 +72,12 @@ if (_painStatus > (_unit getVariable [QGVAR(painSuppress), 0])) then { }; }; -if (_bloodVolume < 30) exitWith { +if (_bloodVolume < BLOOD_VOLUME_DEAD) exitWith { [_unit] call FUNC(setDead); }; if ([_unit] call EFUNC(common,isAwake)) then { - if (_bloodVolume < 60) then { + if (_bloodVolume < BLOOD_VOLUME_UNCONSCIOUS) then { if (random(1) > 0.9) then { [_unit, true, 15 + random(20)] call FUNC(setUnconscious); }; @@ -125,7 +125,7 @@ if (GVAR(level) >= 2) then { _bloodPressure params ["_bloodPressureL", "_bloodPressureH"]; if (!(_unit getVariable [QGVAR(inCardiacArrest),false])) then { - if (_heartRate < 10 || _bloodPressureH < 30 || _bloodVolume < 20) then { + if (_heartRate < 10 || _bloodPressureH < 30 || _bloodVolume < BLOOD_VOLUME_CARDIAC_ARREST) then { [_unit, true, 10+ random(20)] call FUNC(setUnconscious); // safety check to ensure unconsciousness for units if they are not dead already. }; diff --git a/addons/medical/script_macros_medical.hpp b/addons/medical/script_macros_medical.hpp index 907b47c2f1..0122509abd 100644 --- a/addons/medical/script_macros_medical.hpp +++ b/addons/medical/script_macros_medical.hpp @@ -20,3 +20,7 @@ #define HAS_LOST_SOME_BLOOD_THRESHOLD 0.100 // in liters #define HAS_LOST_MUCH_BLOOD_THRESHOLD 0.500 // in liters + +#define BLOOD_VOLUME_UNCONSCIOUS 3.6 // in liters +#define BLOOD_VOLUME_DEAD 1.8 // in liters +#define BLOOD_VOLUME_CARDIAC_ARREST 1.2 // in liters