don't break if they haven't defined the Sun section of their config

afrisby
Sean Dague 2007-11-09 20:02:44 +00:00
parent 114945b842
commit 3e5ea796ae
1 changed files with 10 additions and 2 deletions

View File

@ -54,8 +54,16 @@ namespace OpenSim.Region.Environment.Modules
{
m_start = DateTime.Now.Ticks;
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_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_scene = scene;
m_log = MainLog.Instance;