Disabled pain effect while unconscious

If the player is unconscious the pain effect is disabled.
This commit is contained in:
IngoKauffmann 2015-06-03 17:53:09 +02:00
parent e60cfddc77
commit ede8d74c54

View File

@ -164,14 +164,18 @@ GVAR(lastHeartBeatSound) = ACE_time;
if (_heartRate <= 0) exitwith {}; if (_heartRate <= 0) exitwith {};
_interval = 60 / (_heartRate min 50); _interval = 60 / (_heartRate min 50);
if (ACE_time > GVAR(lastHeartBeat) + _interval) then { if ((ACE_player getVariable ["ACE_isUnconscious", false])) then {
if (GVAR(painEffectType) == 1) then {
GVAR(effectPainCA) ppEffectEnable false;
} else {
GVAR(effectPainCC) ppEffectEnable false;
};
} else {
if ((ACE_time > GVAR(lastHeartBeat) + _interval)) then {
GVAR(lastHeartBeat) = ACE_time; GVAR(lastHeartBeat) = ACE_time;
// Pain effect // Pain effect
_strength = (_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0; _strength = (_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0;
if (ACE_player getVariable ["ACE_isUnconscious", false]) then {
_strength = _strength min 0.1;
};
_strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]); _strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]);
if (GVAR(painEffectType) == 1) then { if (GVAR(painEffectType) == 1) then {
GVAR(effectPainCC) ppEffectEnable false; GVAR(effectPainCC) ppEffectEnable false;
@ -219,6 +223,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
}; };
}; };
}; };
};
if (GVAR(level) >= 2 && {_heartRate > 0}) then { if (GVAR(level) >= 2 && {_heartRate > 0}) then {
_minTime = 60 / _heartRate; _minTime = 60 / _heartRate;