diff options
Diffstat (limited to 'OpenSim/Region/Framework')
4 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs index 93930ce..70ff954 100644 --- a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs +++ b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using System.Collections.Generic; | ||
30 | using OpenMetaverse; | 31 | using OpenMetaverse; |
31 | 32 | ||
32 | namespace OpenSim.Region.Framework.Interfaces | 33 | namespace OpenSim.Region.Framework.Interfaces |
@@ -131,6 +132,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
131 | /// <param name="cname">Name of constant</param> | 132 | /// <param name="cname">Name of constant</param> |
132 | /// <returns>Value of constant or null if none found.</returns> | 133 | /// <returns>Value of constant or null if none found.</returns> |
133 | object LookupModConstant(string cname); | 134 | object LookupModConstant(string cname); |
135 | Dictionary<string, object> GetConstants(); | ||
134 | 136 | ||
135 | // For use ONLY by the script API | 137 | // For use ONLY by the script API |
136 | void RaiseEvent(UUID script, string id, string module, string command, string key); | 138 | void RaiseEvent(UUID script, string id, string module, string command, string key); |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index e2414eb..8691b91 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -2947,6 +2947,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2947 | { | 2947 | { |
2948 | foreach (Action<Scene> d in handler.GetInvocationList()) | 2948 | foreach (Action<Scene> d in handler.GetInvocationList()) |
2949 | { | 2949 | { |
2950 | m_log.InfoFormat("[EVENT MANAGER]: TriggerSceneShuttingDown invoque {0}", d.Method.Name.ToString()); | ||
2950 | try | 2951 | try |
2951 | { | 2952 | { |
2952 | d(s); | 2953 | d(s); |
@@ -2959,6 +2960,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2959 | } | 2960 | } |
2960 | } | 2961 | } |
2961 | } | 2962 | } |
2963 | m_log.Info("[EVENT MANAGER]: TriggerSceneShuttingDown done"); | ||
2962 | } | 2964 | } |
2963 | 2965 | ||
2964 | public void TriggerOnRegionStarted(Scene scene) | 2966 | public void TriggerOnRegionStarted(Scene scene) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4282b46..2543333 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1335,9 +1335,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1335 | // Stop all client threads. | 1335 | // Stop all client threads. |
1336 | ForEachScenePresence(delegate(ScenePresence avatar) { avatar.ControllingClient.Close(); }); | 1336 | ForEachScenePresence(delegate(ScenePresence avatar) { avatar.ControllingClient.Close(); }); |
1337 | 1337 | ||
1338 | m_log.Debug("[SCENE]: Persisting changed objects"); | 1338 | m_log.Debug("[SCENE]: TriggerSceneShuttingDown"); |
1339 | EventManager.TriggerSceneShuttingDown(this); | 1339 | EventManager.TriggerSceneShuttingDown(this); |
1340 | 1340 | ||
1341 | m_log.Debug("[SCENE]: Persisting changed objects"); | ||
1342 | |||
1341 | EntityBase[] entities = GetEntities(); | 1343 | EntityBase[] entities = GetEntities(); |
1342 | foreach (EntityBase entity in entities) | 1344 | foreach (EntityBase entity in entities) |
1343 | { | 1345 | { |
@@ -1347,6 +1349,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1347 | } | 1349 | } |
1348 | } | 1350 | } |
1349 | 1351 | ||
1352 | m_log.Debug("[SCENE]: Graph close"); | ||
1350 | m_sceneGraph.Close(); | 1353 | m_sceneGraph.Close(); |
1351 | 1354 | ||
1352 | if (!GridService.DeregisterRegion(RegionInfo.RegionID)) | 1355 | if (!GridService.DeregisterRegion(RegionInfo.RegionID)) |
@@ -1359,6 +1362,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1359 | // attempt to reference a null or disposed physics scene. | 1362 | // attempt to reference a null or disposed physics scene. |
1360 | if (PhysicsScene != null) | 1363 | if (PhysicsScene != null) |
1361 | { | 1364 | { |
1365 | m_log.Debug("[SCENE]: Dispose Physics"); | ||
1362 | PhysicsScene phys = PhysicsScene; | 1366 | PhysicsScene phys = PhysicsScene; |
1363 | // remove the physics engine from both Scene and SceneGraph | 1367 | // remove the physics engine from both Scene and SceneGraph |
1364 | PhysicsScene = null; | 1368 | PhysicsScene = null; |
@@ -1401,6 +1405,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1401 | } | 1405 | } |
1402 | // m_lastUpdate = Util.EnvironmentTickCount(); | 1406 | // m_lastUpdate = Util.EnvironmentTickCount(); |
1403 | 1407 | ||
1408 | // m_sceneGraph.PreparePhysicsSimulation(); | ||
1409 | |||
1410 | |||
1404 | m_heartbeatThread | 1411 | m_heartbeatThread |
1405 | = Watchdog.StartThread( | 1412 | = Watchdog.StartThread( |
1406 | Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, false); | 1413 | Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, false); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 5714fdd..2191cfa 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -813,7 +813,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
813 | actor.Orientation = GetWorldRotation(); | 813 | actor.Orientation = GetWorldRotation(); |
814 | 814 | ||
815 | // Tell the physics engines that this prim changed. | 815 | // Tell the physics engines that this prim changed. |
816 | if (ParentGroup.Scene != null) | 816 | if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene != null) |
817 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); | 817 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); |
818 | } | 818 | } |
819 | 819 | ||