Skip to content

Commit

Permalink
small fix for changing scripted optics
Browse files Browse the repository at this point in the history
  • Loading branch information
commy2 committed Apr 27, 2019
1 parent e5c0eb4 commit 05d9e54
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addons/optics/fnc_updateOpticInfo.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ if (_optic isEqualTo GVAR(currentOptic)) exitWith {};
GVAR(currentOptic) = _optic;

private _config = configFile >> "CfgWeapons" >> _optic >> "CBA_ScriptedOptic";
if (!isClass _config) exitWith {};
if (!isClass _config) exitWith {
GVAR(OpticReticleDetailTextures) = [[0,"",1,""]];
GVAR(OpticBodyTexture) = "";
ppEffectDestroy GVAR(ppEffects);
};

getArray (_config >> "minMagnificationReticleScale") apply {PARSE(_x)} params [["_minMagnification", 1], ["_minMagnificationReticleScale", 1]];
getArray (_config >> "maxMagnificationReticleScale") apply {PARSE(_x)} params [["_maxMagnification", 1], ["_maxMagnificationReticleScale", 1]];
Expand Down

0 comments on commit 05d9e54

Please sign in to comment.