Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle expressions in CfgOpticsEffect #1165

Merged
merged 2 commits into from
Jun 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions addons/optics/CfgOpticsEffect.hpp
Original file line number Diff line number Diff line change
@@ -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;
};
};
6 changes: 5 additions & 1 deletion addons/optics/fnc_updateOpticInfo.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down