aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs21
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs17
3 files changed, 42 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
index 181c5ae..710e356 100644
--- a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs
@@ -35,6 +35,7 @@ using OpenSim.Framework;
35using OpenSim.Framework.Client; 35using OpenSim.Framework.Client;
36using OpenSim.Region.Framework.Interfaces; 36using OpenSim.Region.Framework.Interfaces;
37using OpenSim.Region.Framework.Scenes; 37using OpenSim.Region.Framework.Scenes;
38using OpenSim.Framework.Console;
38 39
39namespace OpenSim.Region.CoreModules.World.Land 40namespace OpenSim.Region.CoreModules.World.Land
40{ 41{
@@ -61,7 +62,10 @@ namespace OpenSim.Region.CoreModules.World.Land
61 IConfig myConfig = source.Configs["Startup"]; 62 IConfig myConfig = source.Configs["Startup"];
62 enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false); 63 enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false);
63 //enabledYN = true; 64 //enabledYN = true;
64 } 65 if (enabledYN)
66 MainConsole.Instance.Commands.AddCommand("RegionCombinerModule", false, "fix-phantoms",
67 "Fix phantom objects", "Fixes phantom objects after an import to megaregions", FixPhantoms);
68 }
65 69
66 public void Close() 70 public void Close()
67 { 71 {
@@ -910,5 +914,20 @@ namespace OpenSim.Region.CoreModules.World.Land
910 VirtualRegion.Permissions.OnTeleport += BigRegion.PermissionModule.CanTeleport; //NOT YET IMPLEMENTED 914 VirtualRegion.Permissions.OnTeleport += BigRegion.PermissionModule.CanTeleport; //NOT YET IMPLEMENTED
911 VirtualRegion.Permissions.OnUseObjectReturn += BigRegion.PermissionModule.CanUseObjectReturn; //NOT YET IMPLEMENTED 915 VirtualRegion.Permissions.OnUseObjectReturn += BigRegion.PermissionModule.CanUseObjectReturn; //NOT YET IMPLEMENTED
912 } 916 }
917
918 #region console commands
919 public void FixPhantoms(string module, string[] cmdparams)
920 {
921 List<Scene> scenes = new List<Scene>(m_startingScenes.Values);
922 foreach (Scene s in scenes)
923 {
924 s.ForEachSOG(delegate(SceneObjectGroup e)
925 {
926 e.AbsolutePosition = e.AbsolutePosition;
927 }
928 );
929 }
930 }
931 #endregion
913 } 932 }
914} 933}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index bb47ff4..39f3007 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4141,6 +4141,11 @@ namespace OpenSim.Region.Framework.Scenes
4141 m_sceneGraph.ForEachClient(action); 4141 m_sceneGraph.ForEachClient(action);
4142 } 4142 }
4143 4143
4144 public void ForEachSOG(Action<SceneObjectGroup> action)
4145 {
4146 m_sceneGraph.ForEachSOG(action);
4147 }
4148
4144 /// <summary> 4149 /// <summary>
4145 /// Returns a list of the entities in the scene. This is a new list so operations perform on the list itself 4150 /// Returns a list of the entities in the scene. This is a new list so operations perform on the list itself
4146 /// will not affect the original list of objects in the scene. 4151 /// will not affect the original list of objects in the scene.
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 48dea07..0c471aa 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1134,6 +1134,23 @@ namespace OpenSim.Region.Framework.Scenes
1134 } 1134 }
1135 } 1135 }
1136 1136
1137 protected internal void ForEachSOG(Action<SceneObjectGroup> action)
1138 {
1139 List<SceneObjectGroup> objlist = new List<SceneObjectGroup>(SceneObjectGroupsByFullID.Values);
1140 foreach (SceneObjectGroup obj in objlist)
1141 {
1142 try
1143 {
1144 action(obj);
1145 }
1146 catch (Exception e)
1147 {
1148 // Catch it and move on. This includes situations where splist has inconsistent info
1149 m_log.WarnFormat("[SCENE]: Problem processing action in ForEachSOG: ", e.Message);
1150 }
1151 }
1152 }
1153
1137 #endregion 1154 #endregion
1138 1155
1139 #region Client Event handlers 1156 #region Client Event handlers