mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Disabled pain effect while unconscious
If the player is unconscious the pain effect is disabled.
This commit is contained in:
parent
e60cfddc77
commit
ede8d74c54
@ -164,14 +164,18 @@ GVAR(lastHeartBeatSound) = ACE_time;
|
||||
if (_heartRate <= 0) exitwith {};
|
||||
_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;
|
||||
|
||||
// Pain effect
|
||||
_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)]);
|
||||
if (GVAR(painEffectType) == 1) then {
|
||||
GVAR(effectPainCC) ppEffectEnable false;
|
||||
@ -219,6 +223,7 @@ GVAR(lastHeartBeatSound) = ACE_time;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (GVAR(level) >= 2 && {_heartRate > 0}) then {
|
||||
_minTime = 60 / _heartRate;
|
||||
|
Loading…
Reference in New Issue
Block a user