diff options
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 52 | ||||
-rw-r--r-- | bin/OpenSimDefaults.ini | 42 |
2 files changed, 75 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 503b745..935cac5 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -165,17 +165,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
165 | /// </summary> | 165 | /// </summary> |
166 | protected DateTime m_lastFrameUpdate = DateTime.UtcNow; | 166 | protected DateTime m_lastFrameUpdate = DateTime.UtcNow; |
167 | 167 | ||
168 | // TODO: Possibly stop other classes being able to manipulate this directly. | ||
169 | private SceneGraph m_sceneGraph; | ||
170 | private volatile int m_bordersLocked; | ||
171 | // private int m_RestartTimerCounter; | ||
172 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing | ||
173 | // private int m_incrementsof15seconds; | ||
174 | private volatile bool m_backingup; | ||
175 | private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>(); | ||
176 | private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>(); | ||
177 | private Object m_heartbeatLock = new Object(); | ||
178 | |||
179 | private int m_update_physics = 1; | 168 | private int m_update_physics = 1; |
180 | private int m_update_entitymovement = 1; | 169 | private int m_update_entitymovement = 1; |
181 | private int m_update_objects = 1; | 170 | private int m_update_objects = 1; |
@@ -200,6 +189,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
200 | private int lastCompletedFrame; | 189 | private int lastCompletedFrame; |
201 | 190 | ||
202 | public bool CombineRegions = false; | 191 | public bool CombineRegions = false; |
192 | /// <summary> | ||
193 | /// Signals whether temporary objects are currently being cleaned up. Needed because this is launched | ||
194 | /// asynchronously from the update loop. | ||
195 | /// </summary> | ||
196 | private bool m_cleaningTemps = false; | ||
197 | |||
198 | private Object m_heartbeatLock = new Object(); | ||
199 | |||
200 | // TODO: Possibly stop other classes being able to manipulate this directly. | ||
201 | private SceneGraph m_sceneGraph; | ||
202 | private volatile int m_bordersLocked; | ||
203 | // private int m_RestartTimerCounter; | ||
204 | private readonly Timer m_restartTimer = new Timer(15000); // Wait before firing | ||
205 | // private int m_incrementsof15seconds; | ||
206 | private volatile bool m_backingup; | ||
207 | private Dictionary<UUID, ReturnInfo> m_returns = new Dictionary<UUID, ReturnInfo>(); | ||
208 | private Dictionary<UUID, SceneObjectGroup> m_groupsWithTargets = new Dictionary<UUID, SceneObjectGroup>(); | ||
209 | |||
203 | private bool m_physics_enabled = true; | 210 | private bool m_physics_enabled = true; |
204 | private bool m_scripts_enabled = true; | 211 | private bool m_scripts_enabled = true; |
205 | private string m_defaultScriptEngine; | 212 | private string m_defaultScriptEngine; |
@@ -213,8 +220,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
213 | private bool m_firstHeartbeat = true; | 220 | private bool m_firstHeartbeat = true; |
214 | 221 | ||
215 | private object m_deleting_scene_object = new object(); | 222 | private object m_deleting_scene_object = new object(); |
216 | |||
217 | private bool m_cleaningTemps = false; | ||
218 | 223 | ||
219 | private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; | 224 | private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; |
220 | private bool m_reprioritizationEnabled = true; | 225 | private bool m_reprioritizationEnabled = true; |
@@ -226,8 +231,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
226 | private bool m_generateMaptiles; | 231 | private bool m_generateMaptiles; |
227 | private bool m_useBackup = true; | 232 | private bool m_useBackup = true; |
228 | 233 | ||
229 | // private Dictionary<UUID, string[]> m_UserNamesCache = new Dictionary<UUID, string[]>(); | ||
230 | |||
231 | #endregion Fields | 234 | #endregion Fields |
232 | 235 | ||
233 | #region Properties | 236 | #region Properties |
@@ -667,10 +670,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
667 | 670 | ||
668 | m_physics_enabled = !RegionInfo.RegionSettings.DisablePhysics; | 671 | m_physics_enabled = !RegionInfo.RegionSettings.DisablePhysics; |
669 | 672 | ||
670 | StatsReporter = new SimStatsReporter(this); | ||
671 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; | ||
672 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; | ||
673 | |||
674 | // Old | 673 | // Old |
675 | /* | 674 | /* |
676 | m_simulatorVersion = simulatorVersion | 675 | m_simulatorVersion = simulatorVersion |
@@ -767,6 +766,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
767 | RegionInfo.RegionSettings.TerrainImageID = tileID; | 766 | RegionInfo.RegionSettings.TerrainImageID = tileID; |
768 | } | 767 | } |
769 | } | 768 | } |
769 | |||
770 | MinFrameTime = startupConfig.GetFloat( "MinFrameTime", MinFrameTime); | ||
771 | m_update_backup = startupConfig.GetInt( "UpdateStorageEveryNFrames", m_update_backup); | ||
772 | m_update_coarse_locations = startupConfig.GetInt( "UpdateCoarseLocationsEveryNFrames", m_update_coarse_locations); | ||
773 | m_update_entitymovement = startupConfig.GetInt( "UpdateEntityMovementEveryNFrames", m_update_entitymovement); | ||
774 | m_update_events = startupConfig.GetInt( "UpdateEventsEveryNFrames", m_update_events); | ||
775 | m_update_objects = startupConfig.GetInt( "UpdateObjectsEveryNFrames", m_update_objects); | ||
776 | m_update_physics = startupConfig.GetInt( "UpdatePhysicsEveryNFrames", m_update_physics); | ||
777 | m_update_presences = startupConfig.GetInt( "UpdateAgentsEveryNFrames", m_update_presences); | ||
778 | m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain); | ||
779 | m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNFrames", m_update_temp_cleaning); | ||
770 | } | 780 | } |
771 | catch (Exception e) | 781 | catch (Exception e) |
772 | { | 782 | { |
@@ -804,6 +814,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
804 | m_log.Info("[SCENE]: Using the " + m_priorityScheme + " prioritization scheme"); | 814 | m_log.Info("[SCENE]: Using the " + m_priorityScheme + " prioritization scheme"); |
805 | 815 | ||
806 | #endregion Interest Management | 816 | #endregion Interest Management |
817 | |||
818 | StatsReporter = new SimStatsReporter(this); | ||
819 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; | ||
820 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; | ||
807 | } | 821 | } |
808 | 822 | ||
809 | /// <summary> | 823 | /// <summary> |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 9cedd98..f2f8e4f 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -115,6 +115,48 @@ | |||
115 | ; into a restart. | 115 | ; into a restart. |
116 | InworldRestartShutsDown = false | 116 | InworldRestartShutsDown = false |
117 | 117 | ||
118 | ; The minimum proportion of a second that any particular frame can take to execute. | ||
119 | ; Only change this if you really know what you're doing, and be prepared to change UpdatePhysicsEveryNFrames | ||
120 | ; (and other Frames params) to match! For instance, halving MinFrameTime to 0.0445 require | ||
121 | ; UpdatePhysicsEveryNFrames = 2 unless you don't mind your avatar walking like Benny Hill. | ||
122 | MinFrameTime = 0.089 | ||
123 | |||
124 | ; Send scheduled updates to objects in the scene | ||
125 | ; This must be a whole number | ||
126 | UpdateObjectsEveryNFrames = 1; | ||
127 | |||
128 | ; Send position/velocity, etc. updates to agents in the scene | ||
129 | ; This must be a whole number | ||
130 | UpdateAgentsEveryNFrames = 1; | ||
131 | |||
132 | ; Apply pending forces from physics calculations to an entity. | ||
133 | ; This must be a whole number | ||
134 | UpdateEntityMovementEveryNFrames = 1; | ||
135 | |||
136 | ; Send coarse location updates to viewers. In a classic viewer, this updates the minimap. | ||
137 | ; This must be a whole number | ||
138 | UpdateCoarseLocationsEveryNFrames = 50; | ||
139 | |||
140 | ; Update physics. Within each update physics also updates in a series of contigous mini-steps | ||
141 | ; This must be a whole number | ||
142 | UpdatePhysicsEveryNFrames = 1; | ||
143 | |||
144 | ; Clean up temp on rez objects. | ||
145 | ; This must be a whole number | ||
146 | UpdateTempCleaningEveryNFrames = 1000; | ||
147 | |||
148 | ; Send out the on frame event to modules and other listeners. This should probably never deviate from 1. | ||
149 | ; This must be a whole number | ||
150 | UpdateEventsEveryNFrames = 1; | ||
151 | |||
152 | ; Send terrain updates to viewers | ||
153 | ; This must be a whole number | ||
154 | UpdateTerrainEveryNFrames = 50; | ||
155 | |||
156 | ; Persitently store any objects which meet the PRIM STORAGE criteria | ||
157 | ; This must be a whole number | ||
158 | UpdateStorageEveryNFrames = 200; | ||
159 | |||
118 | ; ## | 160 | ; ## |
119 | ; ## PRIM STORAGE | 161 | ; ## PRIM STORAGE |
120 | ; ## | 162 | ; ## |