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,58 +164,63 @@ 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 {
|
||||||
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 {
|
if (GVAR(painEffectType) == 1) then {
|
||||||
|
GVAR(effectPainCA) ppEffectEnable false;
|
||||||
|
} else {
|
||||||
GVAR(effectPainCC) ppEffectEnable false;
|
GVAR(effectPainCC) ppEffectEnable false;
|
||||||
if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then {
|
};
|
||||||
_strength = _strength * 0.15;
|
} else {
|
||||||
GVAR(effectPainCA) ppEffectEnable true;
|
if ((ACE_time > GVAR(lastHeartBeat) + _interval)) then {
|
||||||
GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false];
|
GVAR(lastHeartBeat) = ACE_time;
|
||||||
GVAR(effectPainCA) ppEffectCommit 0.01;
|
|
||||||
[{
|
// Pain effect
|
||||||
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
|
_strength = (_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0;
|
||||||
GVAR(effectPainCA) ppEffectCommit (_this select 1);
|
_strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]);
|
||||||
}, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute);
|
if (GVAR(painEffectType) == 1) then {
|
||||||
[{
|
GVAR(effectPainCC) ppEffectEnable false;
|
||||||
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
|
if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then {
|
||||||
|
_strength = _strength * 0.15;
|
||||||
|
GVAR(effectPainCA) ppEffectEnable true;
|
||||||
|
GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false];
|
||||||
GVAR(effectPainCA) ppEffectCommit 0.01;
|
GVAR(effectPainCA) ppEffectCommit 0.01;
|
||||||
}, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute);
|
[{
|
||||||
[{
|
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
|
||||||
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
|
GVAR(effectPainCA) ppEffectCommit (_this select 1);
|
||||||
GVAR(effectPainCA) ppEffectCommit (_this select 1);
|
}, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute);
|
||||||
}, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute);
|
[{
|
||||||
|
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
|
||||||
|
GVAR(effectPainCA) ppEffectCommit 0.01;
|
||||||
|
}, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute);
|
||||||
|
[{
|
||||||
|
GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false];
|
||||||
|
GVAR(effectPainCA) ppEffectCommit (_this select 1);
|
||||||
|
}, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute);
|
||||||
|
} else {
|
||||||
|
GVAR(effectPainCA) ppEffectEnable false;
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
GVAR(effectPainCA) ppEffectEnable false;
|
GVAR(effectPainCA) ppEffectEnable false;
|
||||||
};
|
if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then {
|
||||||
} else {
|
_strength = _strength * 0.9;
|
||||||
GVAR(effectPainCA) ppEffectEnable false;
|
GVAR(effectPainCC) ppEffectEnable true;
|
||||||
if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then {
|
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - _strength,1 - _strength,0,0,0,0.2,2]];
|
||||||
_strength = _strength * 0.9;
|
|
||||||
GVAR(effectPainCC) ppEffectEnable true;
|
|
||||||
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - _strength,1 - _strength,0,0,0,0.2,2]];
|
|
||||||
GVAR(effectPainCC) ppEffectCommit 0.01;
|
|
||||||
[{
|
|
||||||
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
|
|
||||||
GVAR(effectPainCC) ppEffectCommit (_this select 1);
|
|
||||||
}, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute);
|
|
||||||
[{
|
|
||||||
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
|
|
||||||
GVAR(effectPainCC) ppEffectCommit 0.01;
|
GVAR(effectPainCC) ppEffectCommit 0.01;
|
||||||
}, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute);
|
[{
|
||||||
[{
|
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
|
||||||
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
|
GVAR(effectPainCC) ppEffectCommit (_this select 1);
|
||||||
GVAR(effectPainCC) ppEffectCommit (_this select 1);
|
}, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute);
|
||||||
}, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute);
|
[{
|
||||||
} else {
|
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
|
||||||
GVAR(effectPainCC) ppEffectEnable false;
|
GVAR(effectPainCC) ppEffectCommit 0.01;
|
||||||
|
}, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute);
|
||||||
|
[{
|
||||||
|
GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]];
|
||||||
|
GVAR(effectPainCC) ppEffectCommit (_this select 1);
|
||||||
|
}, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute);
|
||||||
|
} else {
|
||||||
|
GVAR(effectPainCC) ppEffectEnable false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user