aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs49
2 files changed, 26 insertions, 25 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index c6956fc..484159c 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -430,7 +430,7 @@ namespace OpenSim
430 430
431 mscene = scene; 431 mscene = scene;
432 432
433 scene.StartTimer(); 433 scene.Start();
434 434
435 scene.StartScripts(); 435 scene.StartScripts();
436 436
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 8a4c6c9..d354ef0 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -211,7 +211,7 @@ namespace OpenSim.Region.Framework.Scenes
211 /// </summary> 211 /// </summary>
212 private bool m_cleaningTemps = false; 212 private bool m_cleaningTemps = false;
213 213
214 private Object m_heartbeatLock = new Object(); 214// private Object m_heartbeatLock = new Object();
215 215
216 // TODO: Possibly stop other classes being able to manipulate this directly. 216 // TODO: Possibly stop other classes being able to manipulate this directly.
217 private SceneGraph m_sceneGraph; 217 private SceneGraph m_sceneGraph;
@@ -1159,9 +1159,9 @@ namespace OpenSim.Region.Framework.Scenes
1159 } 1159 }
1160 1160
1161 /// <summary> 1161 /// <summary>
1162 /// Start the scene loop 1162 /// Start the scene
1163 /// </summary> 1163 /// </summary>
1164 public void StartTimer() 1164 public void Start()
1165 { 1165 {
1166// m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName); 1166// m_log.DebugFormat("[SCENE]: Starting Heartbeat timer for {0}", RegionInfo.RegionName);
1167 1167
@@ -1206,33 +1206,34 @@ namespace OpenSim.Region.Framework.Scenes
1206 /// </summary> 1206 /// </summary>
1207 private void Heartbeat() 1207 private void Heartbeat()
1208 { 1208 {
1209 if (!Monitor.TryEnter(m_heartbeatLock)) 1209// if (!Monitor.TryEnter(m_heartbeatLock))
1210 { 1210// {
1211 Watchdog.RemoveThread(); 1211// Watchdog.RemoveThread();
1212 return; 1212// return;
1213 } 1213// }
1214 1214
1215 try 1215// try
1216 { 1216// {
1217 m_eventManager.TriggerOnRegionStarted(this); 1217
1218 m_eventManager.TriggerOnRegionStarted(this);
1218 1219
1219 // The first frame can take a very long time due to physics actors being added on startup. Therefore, 1220 // The first frame can take a very long time due to physics actors being added on startup. Therefore,
1220 // don't turn on the watchdog alarm for this thread until the second frame, in order to prevent false 1221 // don't turn on the watchdog alarm for this thread until the second frame, in order to prevent false
1221 // alarms for scenes with many objects. 1222 // alarms for scenes with many objects.
1222 Update(1); 1223 Update(1);
1223 Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true; 1224 Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true;
1224 1225
1225 while (!shuttingdown) 1226 while (!shuttingdown)
1226 Update(-1); 1227 Update(-1);
1227 1228
1228// m_lastUpdate = Util.EnvironmentTickCount(); 1229// m_lastUpdate = Util.EnvironmentTickCount();
1229// m_firstHeartbeat = false; 1230// m_firstHeartbeat = false;
1230 } 1231// }
1231 finally 1232// finally
1232 { 1233// {
1233 Monitor.Pulse(m_heartbeatLock); 1234// Monitor.Pulse(m_heartbeatLock);
1234 Monitor.Exit(m_heartbeatLock); 1235// Monitor.Exit(m_heartbeatLock);
1235 } 1236// }
1236 1237
1237 Watchdog.RemoveThread(); 1238 Watchdog.RemoveThread();
1238 } 1239 }