Thanks for this!>Don't work on 4.0.6
Looking into the LightIntBand.dbc I'm asking myself if it is possible just to run an algorithm over the color fields to make a little bit less of darkness.
In your file there are also much more records than in the original file.
However, what I didn't understand at all is how the id is linked to a specific zone in light.dbc. In your file there are also much more records than in the original file.
To get the right ID out from .Light.dbc (skyParam) you need to calculate it the following way: idLightIntBand = lightEntry.skyParam * 18 - 17
// night cycle if time between 21:00 and 6:00 time_t curTime = time(NULL); tm localTm; ACE_OS::localtime_r(&curTime, &localTm); if (localTm.tm_hour>=21 || localTm.tm_hour<=6) { TC_LOG_INFO("weather", "It's night time."); m_type = WEATHER_TYPE_FINE; m_grade = 0.0f; return false; }
Code: [Select] // night cycle if time between 21:00 and 6:00 time_t curTime = time(NULL); tm localTm; ACE_OS::localtime_r(&curTime, &localTm); if (localTm.tm_hour>=21 || localTm.tm_hour<=6) { TC_LOG_INFO("weather", "It's night time."); m_type = WEATHER_TYPE_FINE; m_grade = 0.0f; return false; }