diff options
author | Melanie | 2012-06-06 13:07:05 +0100 |
---|---|---|
committer | Melanie | 2012-06-06 13:07:05 +0100 |
commit | e733fb32cf76672cfddc25b3c9c02c50c025e2db (patch) | |
tree | 1535c9e7d70cdb5f2e0779db8fc85fb98ede7ca5 /OpenSim/Region/RegionCombinerModule | |
parent | Merge branch 'master' into careminster (diff) | |
parent | minor: Change log messages on Warp3DImageModule to show they are from this mo... (diff) | |
download | opensim-SC-e733fb32cf76672cfddc25b3c9c02c50c025e2db.zip opensim-SC-e733fb32cf76672cfddc25b3c9c02c50c025e2db.tar.gz opensim-SC-e733fb32cf76672cfddc25b3c9c02c50c025e2db.tar.bz2 opensim-SC-e733fb32cf76672cfddc25b3c9c02c50c025e2db.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs
OpenSim/Region/Framework/Scenes/Scene.cs
OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
Diffstat (limited to 'OpenSim/Region/RegionCombinerModule')
-rw-r--r-- | OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs index 40daf13..204c4ff 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.RegionCombinerModule | |||
61 | /// <summary> | 61 | /// <summary> |
62 | /// Is this module enabled? | 62 | /// Is this module enabled? |
63 | /// </summary> | 63 | /// </summary> |
64 | private bool enabledYN = false; | 64 | private bool m_combineContiguousRegions = false; |
65 | 65 | ||
66 | /// <summary> | 66 | /// <summary> |
67 | /// This holds the root regions for the megaregions. | 67 | /// This holds the root regions for the megaregions. |
@@ -79,14 +79,12 @@ namespace OpenSim.Region.RegionCombinerModule | |||
79 | public void Initialise(IConfigSource source) | 79 | public void Initialise(IConfigSource source) |
80 | { | 80 | { |
81 | IConfig myConfig = source.Configs["Startup"]; | 81 | IConfig myConfig = source.Configs["Startup"]; |
82 | enabledYN = myConfig.GetBoolean("CombineContiguousRegions", false); | 82 | m_combineContiguousRegions = myConfig.GetBoolean("CombineContiguousRegions", false); |
83 | 83 | ||
84 | if (enabledYN) | 84 | MainConsole.Instance.Commands.AddCommand( |
85 | { | 85 | "RegionCombinerModule", false, "fix-phantoms", "fix-phantoms", |
86 | MainConsole.Instance.Commands.AddCommand( | 86 | "Fixes phantom objects after an import to a megaregion or a change from a megaregion back to normal regions", |
87 | "RegionCombinerModule", false, "fix-phantoms", "fix-phantoms", | 87 | FixPhantoms); |
88 | "Fixes phantom objects after an import to megaregions", FixPhantoms); | ||
89 | } | ||
90 | } | 88 | } |
91 | 89 | ||
92 | public void Close() | 90 | public void Close() |
@@ -95,7 +93,7 @@ namespace OpenSim.Region.RegionCombinerModule | |||
95 | 93 | ||
96 | public void AddRegion(Scene scene) | 94 | public void AddRegion(Scene scene) |
97 | { | 95 | { |
98 | if (enabledYN) | 96 | if (m_combineContiguousRegions) |
99 | scene.RegisterModuleInterface<IRegionCombinerModule>(this); | 97 | scene.RegisterModuleInterface<IRegionCombinerModule>(this); |
100 | } | 98 | } |
101 | 99 | ||
@@ -105,7 +103,10 @@ namespace OpenSim.Region.RegionCombinerModule | |||
105 | 103 | ||
106 | public void RegionLoaded(Scene scene) | 104 | public void RegionLoaded(Scene scene) |
107 | { | 105 | { |
108 | if (enabledYN) | 106 | lock (m_startingScenes) |
107 | m_startingScenes.Add(scene.RegionInfo.originRegionID, scene); | ||
108 | |||
109 | if (m_combineContiguousRegions) | ||
109 | { | 110 | { |
110 | RegionLoadedDoWork(scene); | 111 | RegionLoadedDoWork(scene); |
111 | 112 | ||
@@ -208,7 +209,6 @@ namespace OpenSim.Region.RegionCombinerModule | |||
208 | { | 209 | { |
209 | return; | 210 | return; |
210 | } | 211 | } |
211 | |||
212 | } | 212 | } |
213 | } | 213 | } |
214 | 214 | ||
@@ -220,8 +220,6 @@ namespace OpenSim.Region.RegionCombinerModule | |||
220 | return; | 220 | return; |
221 | // | 221 | // |
222 | */ | 222 | */ |
223 | lock (m_startingScenes) | ||
224 | m_startingScenes.Add(scene.RegionInfo.originRegionID, scene); | ||
225 | 223 | ||
226 | // Give each region a standard set of non-infinite borders | 224 | // Give each region a standard set of non-infinite borders |
227 | Border northBorder = new Border(); | 225 | Border northBorder = new Border(); |
@@ -1068,6 +1066,8 @@ namespace OpenSim.Region.RegionCombinerModule | |||
1068 | 1066 | ||
1069 | foreach (Scene s in scenes) | 1067 | foreach (Scene s in scenes) |
1070 | { | 1068 | { |
1069 | MainConsole.Instance.OutputFormat("Fixing phantoms for {0}", s.RegionInfo.RegionName); | ||
1070 | |||
1071 | s.ForEachSOG(so => so.AbsolutePosition = so.AbsolutePosition); | 1071 | s.ForEachSOG(so => so.AbsolutePosition = so.AbsolutePosition); |
1072 | } | 1072 | } |
1073 | } | 1073 | } |