Medical Feedback - Fix pain effects when set to Only high pain effect (#8534)

Close #8533
This commit is contained in:
PabstMirror 2021-10-16 21:13:40 -05:00 committed by GitHub
parent 5fc9856b61
commit e1141cdd27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -19,10 +19,10 @@
params ["_enable", "_intensity"];
if (!_enable || {_intensity == 0}) exitWith {
GVAR(ppPain) ppEffectEnable false;
if (GVAR(ppPain) != -1) then { GVAR(ppPain) ppEffectEnable false; };
GVAR(ppPainBlur) ppEffectEnable false;
};
GVAR(ppPain) ppEffectEnable true;
if (GVAR(ppPain) != -1) then { GVAR(ppPain) ppEffectEnable true; };
GVAR(ppPainBlur) ppEffectEnable true;
// Trigger effect every 2s

View File

@ -33,7 +33,7 @@ private _fnc_createEffect = {
// - Pain ---------------------------------------------------------------------
if (!isNil QGVAR(ppPain)) then {
TRACE_1("delete pain",GVAR(ppPain));
ppEffectDestroy GVAR(ppPain)
if (GVAR(ppPain) != -1) then { ppEffectDestroy GVAR(ppPain); };
};
switch (GVAR(painEffectType)) do {
case FX_PAIN_WHITE_FLASH: {
@ -57,6 +57,7 @@ switch (GVAR(painEffectType)) do {
[0, 0, false]
] call _fnc_createEffect;
};
default { GVAR(ppPain) = -1; };
};
// Base blur on high pain
if (isNil QGVAR(ppPainBlur)) then {