From 7ba61ea46c8b70c607f42643b0c2ab7c111af6a6 Mon Sep 17 00:00:00 2001 From: He-Man Date: Tue, 1 May 2018 14:31:59 +0200 Subject: [PATCH] Preload PostProcess and only disable Create / destroy cause some weird effects especially for Alcohol PostProcess --- .../scripts/post_process/Epoch_setDrunk.sqf | 10 ++++++---- .../post_process/Epoch_setRadiation.sqf | 18 +++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Sources/epoch_code/gui/scripts/post_process/Epoch_setDrunk.sqf b/Sources/epoch_code/gui/scripts/post_process/Epoch_setDrunk.sqf index 23440039..86b3d223 100644 --- a/Sources/epoch_code/gui/scripts/post_process/Epoch_setDrunk.sqf +++ b/Sources/epoch_code/gui/scripts/post_process/Epoch_setDrunk.sqf @@ -24,19 +24,21 @@ private ["_priority","_wd","_db"]; params [["_level",0,[0]],["_speed",0,[0]]]; if (isNil "rmx_var_drunkHandles") then { - _priority = 15; _wd = ["wetdistortion",_priority] call epoch_postProcessCreate; _db = ["dynamicBlur",_priority] call epoch_postProcessCreate; - rmx_var_drunkHandles = [_wd,_db]; + + // Preload defaults + [(rmx_var_drunkHandles select 0), 0, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]] call epoch_postprocessAdjust; + [(rmx_var_drunkHandles select 1), 0, [0]] call epoch_postprocessAdjust; }; switch _level do { case 0: { - rmx_var_drunkHandles call epoch_postprocessDestroy; - rmx_var_drunkHandles = nil; + (rmx_var_drunkHandles select 0) ppEffectEnable false; + (rmx_var_drunkHandles select 1) ppEffectEnable false; }; case 0.1: { diff --git a/Sources/epoch_code/gui/scripts/post_process/Epoch_setRadiation.sqf b/Sources/epoch_code/gui/scripts/post_process/Epoch_setRadiation.sqf index ffb2777f..888bbe3c 100644 --- a/Sources/epoch_code/gui/scripts/post_process/Epoch_setRadiation.sqf +++ b/Sources/epoch_code/gui/scripts/post_process/Epoch_setRadiation.sqf @@ -25,25 +25,25 @@ private ["_cc","_ci","_fg","_priority"]; params [["_level",0,[0]],["_speed",0,[0]] ]; if (isNil "rmx_var_RadiationHandles") then { - _priority = 16; _fg = ["filmGrain",_priority] call epoch_postProcessCreate; _cc = ["colorCorrections",_priority] call epoch_postProcessCreate; _ci = ["colorInversion",_priority] call epoch_postProcessCreate; - rmx_var_RadiationHandles = [_fg,_cc,_ci]; + + // Preload defaults + [(rmx_var_RadiationHandles select 0), 0, [0.005,1.25,2.01,0.75,1.0,true]] call epoch_postprocessAdjust; + [(rmx_var_RadiationHandles select 1), 0, [1,1,0,[0,0,0,0],[1,1,1,1],[0.299,0.587,0.114,0],[-1,-1,0,0,0,0,0]]] call epoch_postprocessAdjust; + [(rmx_var_RadiationHandles select 2), 0, [0,0,0]] call epoch_postprocessAdjust; }; switch _level do { - case 0: - { - rmx_var_RadiationHandles call epoch_postprocessDestroy; - rmx_var_RadiationHandles = nil; - }; + case 0; case 0.1: { - rmx_var_RadiationHandles call epoch_postprocessDestroy; - rmx_var_RadiationHandles = nil; + (rmx_var_RadiationHandles select 0) ppEffectEnable false; + (rmx_var_RadiationHandles select 1) ppEffectEnable false; + (rmx_var_RadiationHandles select 2) ppEffectEnable false; }; case 0.2: {