Merge branch 'ubitwork' into avination

This commit is contained in:
Melanie
2012-11-01 22:25:29 +01:00
5 changed files with 33 additions and 14 deletions

View File

@@ -2458,6 +2458,7 @@ namespace OpenSim.Region.Framework.Scenes
{
foreach (Action<Scene> d in handler.GetInvocationList())
{
m_log.InfoFormat("[EVENT MANAGER]: TriggerSceneShuttingDown invoque {0}", d.Method.Name.ToString());
try
{
d(s);
@@ -2470,6 +2471,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
m_log.Info("[EVENT MANAGER]: TriggerSceneShuttingDown done");
}
public void TriggerOnRegionStarted(Scene scene)

View File

@@ -1255,9 +1255,11 @@ namespace OpenSim.Region.Framework.Scenes
// Stop all client threads.
ForEachScenePresence(delegate(ScenePresence avatar) { avatar.ControllingClient.Close(); });
m_log.Debug("[SCENE]: Persisting changed objects");
m_log.Debug("[SCENE]: TriggerSceneShuttingDown");
EventManager.TriggerSceneShuttingDown(this);
m_log.Debug("[SCENE]: Persisting changed objects");
EntityBase[] entities = GetEntities();
foreach (EntityBase entity in entities)
{
@@ -1267,10 +1269,12 @@ namespace OpenSim.Region.Framework.Scenes
}
}
m_log.Debug("[SCENE]: Graph close");
m_sceneGraph.Close();
if (PhysicsScene != null)
{
m_log.Debug("[SCENE]: Dispose Physics");
PhysicsScene phys = PhysicsScene;
// remove the physics engine from both Scene and SceneGraph
PhysicsScene = null;
@@ -1282,6 +1286,7 @@ namespace OpenSim.Region.Framework.Scenes
m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", Name);
// call the base class Close method.
m_log.Debug("[SCENE]: Base close");
base.Close();
}
@@ -1317,6 +1322,9 @@ namespace OpenSim.Region.Framework.Scenes
}
// m_lastUpdate = Util.EnvironmentTickCount();
// m_sceneGraph.PreparePhysicsSimulation();
m_heartbeatThread
= Watchdog.StartThread(
Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, false);