Merge branch 'avination' into careminster

Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
This commit is contained in:
Melanie
2012-11-04 22:37:28 +00:00
11 changed files with 72 additions and 39 deletions

View File

@@ -27,6 +27,7 @@
using System;
using System.Reflection;
using System.Collections.Generic;
using OpenMetaverse;
namespace OpenSim.Region.Framework.Interfaces
@@ -131,6 +132,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="cname">Name of constant</param>
/// <returns>Value of constant or null if none found.</returns>
object LookupModConstant(string cname);
Dictionary<string, object> GetConstants();
// For use ONLY by the script API
void RaiseEvent(UUID script, string id, string module, string command, string key);

View File

@@ -2947,6 +2947,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);
@@ -2959,6 +2960,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
m_log.Info("[EVENT MANAGER]: TriggerSceneShuttingDown done");
}
public void TriggerOnRegionStarted(Scene scene)

View File

@@ -1335,9 +1335,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)
{
@@ -1347,6 +1349,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
m_log.Debug("[SCENE]: Graph close");
m_sceneGraph.Close();
if (!GridService.DeregisterRegion(RegionInfo.RegionID))
@@ -1359,6 +1362,7 @@ namespace OpenSim.Region.Framework.Scenes
// attempt to reference a null or disposed physics scene.
if (PhysicsScene != null)
{
m_log.Debug("[SCENE]: Dispose Physics");
PhysicsScene phys = PhysicsScene;
// remove the physics engine from both Scene and SceneGraph
PhysicsScene = null;
@@ -1401,6 +1405,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);

View File

@@ -813,7 +813,7 @@ namespace OpenSim.Region.Framework.Scenes
actor.Orientation = GetWorldRotation();
// Tell the physics engines that this prim changed.
if (ParentGroup.Scene != null)
if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene != null)
ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
}