diff options
Diffstat (limited to 'OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs')
-rw-r--r-- | OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index fcb6991..1d63d26 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | |||
@@ -115,6 +115,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
115 | Environment.Exit(1); | 115 | Environment.Exit(1); |
116 | } | 116 | } |
117 | 117 | ||
118 | List<IScene> createdScenes = new List<IScene>(); | ||
119 | |||
118 | for (int i = 0; i < regionsToLoad.Length; i++) | 120 | for (int i = 0; i < regionsToLoad.Length; i++) |
119 | { | 121 | { |
120 | IScene scene; | 122 | IScene scene; |
@@ -123,17 +125,22 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
123 | ")"); | 125 | ")"); |
124 | 126 | ||
125 | bool changed = m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]); | 127 | bool changed = m_openSim.PopulateRegionEstateInfo(regionsToLoad[i]); |
128 | |||
126 | m_openSim.CreateRegion(regionsToLoad[i], true, out scene); | 129 | m_openSim.CreateRegion(regionsToLoad[i], true, out scene); |
130 | createdScenes.Add(scene); | ||
131 | |||
127 | if (changed) | 132 | if (changed) |
128 | regionsToLoad[i].EstateSettings.Save(); | 133 | regionsToLoad[i].EstateSettings.Save(); |
129 | 134 | } | |
130 | if (scene != null) | 135 | |
136 | foreach (IScene scene in createdScenes) | ||
137 | { | ||
138 | scene.Start(); | ||
139 | |||
140 | m_newRegionCreatedHandler = OnNewRegionCreated; | ||
141 | if (m_newRegionCreatedHandler != null) | ||
131 | { | 142 | { |
132 | m_newRegionCreatedHandler = OnNewRegionCreated; | 143 | m_newRegionCreatedHandler(scene); |
133 | if (m_newRegionCreatedHandler != null) | ||
134 | { | ||
135 | m_newRegionCreatedHandler(scene); | ||
136 | } | ||
137 | } | 144 | } |
138 | } | 145 | } |
139 | } | 146 | } |