aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSean Dague2007-11-09 19:53:23 +0000
committerSean Dague2007-11-09 19:53:23 +0000
commit114945b8425145d3c9a348d11bb7b4c5f88e42bd (patch)
tree22d661f309bb53c726ddfc4528bcaa938f18bc23
parent* Moved BulletX off of the 'constant terse update' method. It now only sends... (diff)
downloadopensim-SC_OLD-114945b8425145d3c9a348d11bb7b4c5f88e42bd.zip
opensim-SC_OLD-114945b8425145d3c9a348d11bb7b4c5f88e42bd.tar.gz
opensim-SC_OLD-114945b8425145d3c9a348d11bb7b4c5f88e42bd.tar.bz2
opensim-SC_OLD-114945b8425145d3c9a348d11bb7b4c5f88e42bd.tar.xz
make Sun progression configurable for the Sim from OpenSim.ini
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/SunModule.cs5
-rw-r--r--bin/OpenSim.ini.example9
2 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/SunModule.cs b/OpenSim/Region/Environment/Modules/SunModule.cs
index 5b05dba..d8b1ec9 100644
--- a/OpenSim/Region/Environment/Modules/SunModule.cs
+++ b/OpenSim/Region/Environment/Modules/SunModule.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Modules
41 public class SunModule : IRegionModule 41 public class SunModule : IRegionModule
42 { 42 {
43 private static double m_real_day = 24.0; 43 private static double m_real_day = 24.0;
44 private static int m_frame_mod = 100; 44 private int m_frame_mod = 100;
45 private double m_day_length; 45 private double m_day_length;
46 private int m_dilation; 46 private int m_dilation;
47 private int m_frame; 47 private int m_frame;
@@ -54,7 +54,8 @@ 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 = 0.5; 57 m_day_length = config.Configs["Sun"].GetDouble("day_length", 0.5);
58 m_frame_mod = config.Configs["Sun"].GetInt("frame_rate", 100);
58 m_dilation = (int)(m_real_day / m_day_length); 59 m_dilation = (int)(m_real_day / m_day_length);
59 m_scene = scene; 60 m_scene = scene;
60 m_log = MainLog.Instance; 61 m_log = MainLog.Instance;
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 9aa54a9..3930dd4 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -52,3 +52,12 @@ shout_distance = 100
52;nick = OpenSimBotNameProbablyMakeThisShorter 52;nick = OpenSimBotNameProbablyMakeThisShorter
53;channel = #the_irc_channel_you_want_to_connect_to 53;channel = #the_irc_channel_you_want_to_connect_to
54 54
55; Uncomment the following to control the progression of daytime
56; in the Sim. The defaults are what is shown below
57;[Sun]
58; number of wall clock hours for an opensim day. 24.0 would mean realtime
59;day_length = 0.5
60
61; send a Sun update ever frame_rate # of frames. A lower number will
62; make for smoother sun transition at the cost of network
63;frame_rate = 100