1140 {
1142 {
1144 }
1145 else
1146 {
1148 }
1149
1150 CfgParamArray presetParam;
1152 for (int i = 0; i < weather_params.Count(); i++)
1153 {
1154 presetParam = CfgParamArray.Cast(weather_params.Get(i));
1155 if (!presetParam)
1156 continue;
1157
1158 CfgParamString paramWName = CfgParamString.Cast(presetParam.GetValueByName(
"Name",
CFG_TYPE_STRING));
1159 CfgParamFloat paramOvercast = CfgParamFloat.Cast(presetParam.GetValueByName(
"Overcast",
CFG_TYPE_FLOAT));
1160 CfgParamFloat paramRain = CfgParamFloat.Cast(presetParam.GetValueByName(
"Rain",
CFG_TYPE_FLOAT));
1161 CfgParamFloat paramSnow = CfgParamFloat.Cast(presetParam.GetValueByName(
"Snow",
CFG_TYPE_FLOAT));
1162 CfgParamFloat paramFog = CfgParamFloat.Cast(presetParam.GetValueByName(
"Fog",
CFG_TYPE_FLOAT));
1163 CfgParamFloat paramWindMagnitude = CfgParamFloat.Cast(presetParam.GetValueByName(
"WindMagnitude",
CFG_TYPE_FLOAT));
1164 CfgParamFloat paramWindDirection = CfgParamFloat.Cast(presetParam.GetValueByName(
"WindDirection",
CFG_TYPE_FLOAT));
1165 CfgParamFloat paramVolFogDD = CfgParamFloat.Cast(presetParam.GetValueByName(
"VolFogDD",
CFG_TYPE_FLOAT));
1166 CfgParamFloat paramVolFogHD = CfgParamFloat.Cast(presetParam.GetValueByName(
"VolFogHD",
CFG_TYPE_FLOAT));
1167 CfgParamFloat paramVolFogHB = CfgParamFloat.Cast(presetParam.GetValueByName(
"VolFogHB",
CFG_TYPE_FLOAT));
1168
1169 m_WeatherPresets.Insert(
new ScriptConsoleWeatherPreset(paramWName.GetValue(), paramOvercast.GetValue(), paramRain.GetValue(), paramSnow.GetValue(), paramFog.GetValue(), paramWindMagnitude.GetValue(), paramWindDirection.GetValue(), paramVolFogDD.GetValue(), paramVolFogHD.GetValue(), paramVolFogHB.GetValue()));
1170 }
1171 }
const int CFG_TYPE_STRING
void ScriptConsoleWeatherPreset(string name, float overcast, float rain, float snow, float fog, float windMagnitude, float windDir, float volFogDD, float volFogHD, float volFogHB)
const string WEATHER_PRESETS_LIST
ref array< ref ScriptConsoleWeatherPreset > m_WeatherPresets
array< ref CfgParam > GetArray(string key)