From 67a14305c41bc35a00519af6344fd2f4077e992e Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 17 Jun 2019 09:08:41 +0200 Subject: [PATCH 1/2] handle expressions in CfgOpticsEffect --- addons/optics/fnc_updateOpticInfo.sqf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/optics/fnc_updateOpticInfo.sqf b/addons/optics/fnc_updateOpticInfo.sqf index b09aaf954..da8db29a3 100644 --- a/addons/optics/fnc_updateOpticInfo.sqf +++ b/addons/optics/fnc_updateOpticInfo.sqf @@ -96,7 +96,11 @@ GVAR(ppEffects) = getArray (_config >> "opticsPPEffects") apply { private _config = configFile >> "CfgOpticsEffect" >> _x; private _type = getText (_config >> "type"); private _priority = getNumber (_config >> "priority"); - private _params = getArray (_config >> "params"); + private _params = getArray (_config >> "params") apply { + if (_x isEqualType "") then { + call compile _x + } else {_x}; + }; private _ppEffect = ppEffectCreate [_type, _priority]; _ppEffect ppEffectAdjust _params; From e609381cf8518b49d91958e807917d33b2d019d8 Mon Sep 17 00:00:00 2001 From: commy2 Date: Thu, 20 Jun 2019 22:52:18 +0200 Subject: [PATCH 2/2] handle different resolutions --- addons/optics/CfgOpticsEffect.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/optics/CfgOpticsEffect.hpp b/addons/optics/CfgOpticsEffect.hpp index 53677f9a1..fa68ff8c7 100644 --- a/addons/optics/CfgOpticsEffect.hpp +++ b/addons/optics/CfgOpticsEffect.hpp @@ -1,17 +1,17 @@ class CfgOpticsEffect { class CBA_OpticsRadBlur1 { type = "radialblur"; - params[] = {0.005,0.005,0.20,0.20*16/9}; + params[] = {0.005,0.005,"0.35/(getResolution select 4)",0.35}; priority = 950; }; class CBA_OpticsRadBlur2 { type = "radialblur"; - params[] = {0.01,0.01,0.20,0.20*16/9}; + params[] = {0.01,0.01,"0.35/(getResolution select 4)",0.35}; priority = 950; }; class CBA_OpticsRadBlur3 { type = "radialblur"; - params[] = {0.015,0.015,0.20,0.20*16/9}; + params[] = {0.015,0.015,"0.35/(getResolution select 4)",0.35}; priority = 950; }; };