aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorSean Dague2007-11-09 20:02:44 +0000
committerSean Dague2007-11-09 20:02:44 +0000
commit3e5ea796aecc045c09356d16b4004a5b9a753f96 (patch)
tree2ecb8224449d1901df55f079afc64ab92c2d369d /OpenSim
parentmake Sun progression configurable for the Sim from OpenSim.ini (diff)
downloadopensim-SC-3e5ea796aecc045c09356d16b4004a5b9a753f96.zip
opensim-SC-3e5ea796aecc045c09356d16b4004a5b9a753f96.tar.gz
opensim-SC-3e5ea796aecc045c09356d16b4004a5b9a753f96.tar.bz2
opensim-SC-3e5ea796aecc045c09356d16b4004a5b9a753f96.tar.xz
don't break if they haven't defined the Sun section of their config
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Modules/SunModule.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/SunModule.cs b/OpenSim/Region/Environment/Modules/SunModule.cs
index d8b1ec9..3598798 100644
--- a/OpenSim/Region/Environment/Modules/SunModule.cs
+++ b/OpenSim/Region/Environment/Modules/SunModule.cs
@@ -54,8 +54,16 @@ namespace OpenSim.Region.Environment.Modules
54 { 54 {
55 m_start = DateTime.Now.Ticks; 55 m_start = DateTime.Now.Ticks;
56 m_frame = 0; 56 m_frame = 0;
57 m_day_length = config.Configs["Sun"].GetDouble("day_length", 0.5); 57
58 m_frame_mod = config.Configs["Sun"].GetInt("frame_rate", 100); 58 // Just in case they don't have the stanzas
59 try {
60 m_day_length = config.Configs["Sun"].GetDouble("day_length", 0.5);
61 m_frame_mod = config.Configs["Sun"].GetInt("frame_rate", 100);
62 } catch (Exception e) {
63 m_day_length = 0.5;
64 m_frame_mod = 100;
65 }
66
59 m_dilation = (int)(m_real_day / m_day_length); 67 m_dilation = (int)(m_real_day / m_day_length);
60 m_scene = scene; 68 m_scene = scene;
61 m_log = MainLog.Instance; 69 m_log = MainLog.Instance;