don't break if they haven't defined the Sun section of their config
parent
114945b842
commit
3e5ea796ae
|
@ -54,8 +54,16 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
{
|
{
|
||||||
m_start = DateTime.Now.Ticks;
|
m_start = DateTime.Now.Ticks;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
|
|
||||||
|
// Just in case they don't have the stanzas
|
||||||
|
try {
|
||||||
m_day_length = config.Configs["Sun"].GetDouble("day_length", 0.5);
|
m_day_length = config.Configs["Sun"].GetDouble("day_length", 0.5);
|
||||||
m_frame_mod = config.Configs["Sun"].GetInt("frame_rate", 100);
|
m_frame_mod = config.Configs["Sun"].GetInt("frame_rate", 100);
|
||||||
|
} catch (Exception e) {
|
||||||
|
m_day_length = 0.5;
|
||||||
|
m_frame_mod = 100;
|
||||||
|
}
|
||||||
|
|
||||||
m_dilation = (int)(m_real_day / m_day_length);
|
m_dilation = (int)(m_real_day / m_day_length);
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
m_log = MainLog.Instance;
|
m_log = MainLog.Instance;
|
||||||
|
|
Loading…
Reference in New Issue