aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-05 01:33:58 +0100
committerJustin Clark-Casey (justincc)2012-06-05 01:33:58 +0100
commit42179578fc5292d9bd12aeccc45948d908c42d1a (patch)
tree728ef8a491dc720bdc210c60494b31d641aefa89 /OpenSim/Region
parentMantis 4597 AgentPaused packet is ignored. (diff)
downloadopensim-SC-42179578fc5292d9bd12aeccc45948d908c42d1a.zip
opensim-SC-42179578fc5292d9bd12aeccc45948d908c42d1a.tar.gz
opensim-SC-42179578fc5292d9bd12aeccc45948d908c42d1a.tar.bz2
opensim-SC-42179578fc5292d9bd12aeccc45948d908c42d1a.tar.xz
Allow fix-phantoms command to appear even if CombineContiguousRegions = false, since this allows one to go back from a megaregion to normal regions.
Adapted from a patch by Garmin Kawaguichi in http://opensimulator.org/mantis/view.php?id=6027 Garmin says that fix-phantoms allows one to reset objects when going back from megaregion to normal regions as well as the othe rway around. Thanks!
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs24
1 files changed, 11 insertions, 13 deletions
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
index 40daf13..3555028 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();