From 675b89f360eb2ab495d98cc337058e394eb90696 Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Tue, 10 Feb 2015 23:14:39 +0100 Subject: [PATCH] Add blinding effect to wakeup --- addons/medical/XEH_postInit.sqf | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 9d060aa745..30e3ba6b22 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -91,7 +91,21 @@ GVAR(effectTimeBlood) = time; GVAR(effectUnconsciousRB) ppEffectEnable false; [false] call EFUNC(common,disableUserInput); // @todo, see above if (GVAR(effectBlind)) then { - // @todo: blinding effect on wakeup + _strength = 0.78 * (call EFUNC(common,ambientBrightness)); + GVAR(effectBlindingCC) ppEffectEnable true; + GVAR(effectBlindingCC) ppEffectAdjust [1,1,_strength, [1,1,1,0], [0,0,0,1], [0,0,0,0]]; + GVAR(effectBlindingCC) ppEffectCommit 0; + + [{ + GVAR(effectBlindingCC) ppEffectAdjust [1,1,0, [1,1,1,0], [0,0,0,1], [0,0,0,0]]; + GVAR(effectBlindingCC) ppEffectCommit ((_this select 0) * 2); + }, [_strength], 0.01, 0] call EFUNC(common,waitAndExecute); + + [{ + GVAR(effectBlindingCC) ppEffectEnable false; + }, [], (_strength * 2) + 0.5, 0] call EFUNC(common,waitAndExecute); + + GVAR(effectBlind) = false; }; };