17 float m_fWindDirection;
44 float m_fActualTimeOfDay;
45 float m_fActualWindSpeed;
46 float m_fActualWindDirection;
47 int m_iActualWeatherType;
57 m_iActualWeatherType = -1;
60 weatherManager = chimWorld.GetTimeAndWeatherManager();
63 m_fActualTimeOfDay = -1;
64 m_fActualWindSpeed = -1;
65 m_fActualWindDirection = -1;
68 override void OnApply(
float time)
74 WeatherState weatherState = weatherManager.GetCurrentWeatherState();
78 weatherManager.SetFogAmountOverride(
true, m_fFog);
79 weatherManager.SetFogHeightDensityOverride(
true, m_fFogHeight);
80 weatherManager.SetCurrentWetness(m_fWetness);
81 weatherManager.SetCurrentWaterAccumulation(0,m_fPuddles);
84 if (m_fWindSpeed != m_fActualWindSpeed)
86 weatherManager.SetWindSpeedOverride(
true, m_fWindSpeed);
87 m_fActualWindSpeed = m_fWindSpeed;
90 if (m_fWindDirection != m_fActualWindDirection)
92 weatherManager.SetWindDirectionOverride(
true, m_fWindDirection);
93 m_fActualWindDirection = m_fWindDirection;
98 if (m_fTimeOfDay != m_fActualTimeOfDay)
100 weatherManager.SetTimeOfTheDay(m_fTimeOfDay,
true);
104 weatherManager.SetDate(m_iYear, m_iMonth, m_iDay);
106 m_fActualTimeOfDay = m_fTimeOfDay;
110 if ( m_iWeatherType == 0 && weatherState.GetStateName() !=
"Clear")
112 weatherManager.ForceWeatherTo(
false,
"Clear");
114 }
else if ( m_iWeatherType == 1 && weatherState.GetStateName() !=
"Cloudy") {
116 weatherManager.ForceWeatherTo(
false,
"Cloudy");
118 }
else if ( m_iWeatherType == 2 && weatherState.GetStateName() !=
"Overcast") {
120 weatherManager.ForceWeatherTo(
false,
"Overcast");
122 }
else if (m_iWeatherType == 3 && weatherState.GetStateName() !=
"Rainy") {
124 weatherManager.ForceWeatherTo(
false,
"Rainy");
127 weatherManager.UpdateWeather(0.01);