knock out due to pain

This commit is contained in:
commy2 2016-10-20 13:46:28 +02:00
parent 370faf9b48
commit be56b4d806
2 changed files with 10 additions and 0 deletions

View File

@ -27,3 +27,7 @@ if (_pain > 0) then {
};
_unit setVariable [QEGVAR(medical,pain), _pain];
if (_pain >= PAIN_UNCONSCIOUS) then {
[_unit, true, PAIN_KNOCK_OUT_DURATION] call FUNC(setUnconscious);
};

View File

@ -36,3 +36,9 @@
// --- unconsciousness
#define DEFAULT_KNOCK_OUT_DELAY (5 + random 10)
// --- pain
#define PAIN_UNCONSCIOUS 0.7
// duration in seconds to stay knocked out due to pain
#define PAIN_KNOCK_OUT_DURATION (15 + random 20)