1110 {
1112 {
1114 }
1115 else
1116 {
1118 }
1119
1120 CfgParamArray presetParam;
1122 for (int i = 0; i < camera_params.Count(); i++)
1123 {
1124 presetParam = CfgParamArray.Cast(camera_params.Get(i));
1125 if (!presetParam)
1126 continue;
1127
1128 CfgParamString paramCName = CfgParamString.Cast(presetParam.GetValueByName(
"Name",
CFG_TYPE_STRING));
1129 CfgParamFloat paramFocusDistance = CfgParamFloat.Cast(presetParam.GetValueByName(
"FocusDistance",
CFG_TYPE_FLOAT));
1130 CfgParamFloat paramFocusLength = CfgParamFloat.Cast(presetParam.GetValueByName(
"FocusLength",
CFG_TYPE_FLOAT));
1131 CfgParamFloat paramFocusLengthNear = CfgParamFloat.Cast(presetParam.GetValueByName(
"FocusLengthNear",
CFG_TYPE_FLOAT));
1132 CfgParamFloat paramBlur = CfgParamFloat.Cast(presetParam.GetValueByName(
"Blur",
CFG_TYPE_FLOAT));
1133 CfgParamFloat paramFocusDepthOffset = CfgParamFloat.Cast(presetParam.GetValueByName(
"FocusDepthOffset",
CFG_TYPE_FLOAT));
1134
1135 m_CameraPresets.Insert(
new ScriptConsoleCameraDOFPreset(paramCName.GetValue(), paramFocusDistance.GetValue(), paramFocusLength.GetValue(), paramFocusLengthNear.GetValue(), paramBlur.GetValue(), paramFocusDepthOffset.GetValue()));
1136 }
1137 }
const int CFG_TYPE_STRING
ref array< ref ScriptConsoleCameraDOFPreset > m_CameraPresets
const string CAMERA_PRESETS_LIST
array< ref CfgParam > GetArray(string key)