From 114945b8425145d3c9a348d11bb7b4c5f88e42bd Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 9 Nov 2007 19:53:23 +0000 Subject: make Sun progression configurable for the Sim from OpenSim.ini --- OpenSim/Region/Environment/Modules/SunModule.cs | 5 +++-- bin/OpenSim.ini.example | 9 +++++++++ 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 public class SunModule : IRegionModule { private static double m_real_day = 24.0; - private static int m_frame_mod = 100; + private int m_frame_mod = 100; private double m_day_length; private int m_dilation; private int m_frame; @@ -54,7 +54,8 @@ namespace OpenSim.Region.Environment.Modules { m_start = DateTime.Now.Ticks; m_frame = 0; - m_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_dilation = (int)(m_real_day / m_day_length); m_scene = scene; 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 ;nick = OpenSimBotNameProbablyMakeThisShorter ;channel = #the_irc_channel_you_want_to_connect_to +; Uncomment the following to control the progression of daytime +; in the Sim. The defaults are what is shown below +;[Sun] +; number of wall clock hours for an opensim day. 24.0 would mean realtime +;day_length = 0.5 + +; send a Sun update ever frame_rate # of frames. A lower number will +; make for smoother sun transition at the cost of network +;frame_rate = 100 -- cgit v1.1