From c2e4ee431f2d1336e2cd5174a846e6ff644ed5bf Mon Sep 17 00:00:00 2001 From: SzwedzikPL Date: Thu, 2 Jul 2015 13:56:56 +0200 Subject: [PATCH 1/2] no pain effect in zeus camera --- addons/medical/XEH_postInit.sqf | 86 +++++++++++++++++---------------- 1 file changed, 44 insertions(+), 42 deletions(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 0b51f571652..53ba7eee32d 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -174,52 +174,54 @@ GVAR(lastHeartBeatSound) = ACE_time; if ((ACE_time > GVAR(lastHeartBeat) + _interval)) then { GVAR(lastHeartBeat) = ACE_time; - // Pain effect - _strength = (_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0; - _strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]); - if (GVAR(painEffectType) == 1) then { - GVAR(effectPainCC) ppEffectEnable 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) ppEffectAdjust [(_this select 0), (_this select 0), false]; - GVAR(effectPainCA) ppEffectCommit (_this select 1); - }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute); - [{ - GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; + // Pain effect, no pain effect in zeus camera + if (isNull (findDisplay 312)) then { + _strength = (_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0; + _strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]); + if (GVAR(painEffectType) == 1) then { + GVAR(effectPainCC) ppEffectEnable 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; - }, [_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); + [{ + GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; + GVAR(effectPainCA) ppEffectCommit (_this select 1); + }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 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 { GVAR(effectPainCA) ppEffectEnable false; - }; - } else { - GVAR(effectPainCA) ppEffectEnable false; - if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { - _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]]; + if (_pain > (ACE_player getvariable [QGVAR(painSuppress), 0]) && {alive ACE_player}) then { + _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; - }, [_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; + [{ + 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; + }, [_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; + }; }; }; }; From 13999fdd3195755dcdb2a02ea0897e67586c492c Mon Sep 17 00:00:00 2001 From: SzwedzikPL Date: Thu, 2 Jul 2015 19:36:34 +0200 Subject: [PATCH 2/2] finddisplay into curatorcamera --- addons/medical/XEH_postInit.sqf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 53ba7eee32d..f9f821eeb3b 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -92,7 +92,7 @@ GVAR(effectTimeBlood) = ACE_time; [{ private["_bleeding", "_blood"]; // Zeus interface is open or player is dead; disable everything - if (!(isNull (findDisplay 312)) or !(alive ACE_player)) exitWith { + if (!(isNull curatorCamera) or !(alive ACE_player)) exitWith { GVAR(effectUnconsciousCC) ppEffectEnable false; GVAR(effectUnconsciousRB) ppEffectEnable false; GVAR(effectBlindingCC) ppEffectEnable false; @@ -175,7 +175,7 @@ GVAR(lastHeartBeatSound) = ACE_time; GVAR(lastHeartBeat) = ACE_time; // Pain effect, no pain effect in zeus camera - if (isNull (findDisplay 312)) then { + if (isNull curatorCamera) then { _strength = (_pain - (ACE_player getvariable [QGVAR(painSuppress), 0])) max 0; _strength = _strength * (ACE_player getVariable [QGVAR(painCoefficient), GVAR(painCoefficient)]); if (GVAR(painEffectType) == 1) then {