From bc892c1d4c1f1e818f1dd1d3cf6d03186b19dd0b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 29 Sep 2009 07:54:56 -0700 Subject: A little hack to see if this fixes the problems with ~20% of SOG's becoming phantom after an import to megaregions. --- .../CoreModules/World/Land/RegionCombinerModule.cs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') 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; using OpenSim.Framework.Client; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using OpenSim.Framework.Console; namespace OpenSim.Region.CoreModules.World.Land { @@ -61,7 +62,10 @@ namespace OpenSim.Region.CoreModules.World.Land IConfig myConfig = source.Configs["Startup"]; enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false); //enabledYN = true; - } + if (enabledYN) + MainConsole.Instance.Commands.AddCommand("RegionCombinerModule", false, "fix-phantoms", + "Fix phantom objects", "Fixes phantom objects after an import to megaregions", FixPhantoms); + } public void Close() { @@ -910,5 +914,20 @@ namespace OpenSim.Region.CoreModules.World.Land VirtualRegion.Permissions.OnTeleport += BigRegion.PermissionModule.CanTeleport; //NOT YET IMPLEMENTED VirtualRegion.Permissions.OnUseObjectReturn += BigRegion.PermissionModule.CanUseObjectReturn; //NOT YET IMPLEMENTED } + + #region console commands + public void FixPhantoms(string module, string[] cmdparams) + { + List scenes = new List(m_startingScenes.Values); + foreach (Scene s in scenes) + { + s.ForEachSOG(delegate(SceneObjectGroup e) + { + e.AbsolutePosition = e.AbsolutePosition; + } + ); + } + } + #endregion } } -- cgit v1.1