diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs index 41bff7f..ccfe4ff 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | |||
@@ -110,12 +110,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
110 | 110 | ||
111 | UUID userId = TestHelpers.ParseTail(0x1); | 111 | UUID userId = TestHelpers.ParseTail(0x1); |
112 | 112 | ||
113 | EntityTransferModule etm = new EntityTransferModule(); | 113 | EntityTransferModule etmA = new EntityTransferModule(); |
114 | EntityTransferModule etmB = new EntityTransferModule(); | ||
114 | LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule(); | 115 | LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule(); |
115 | 116 | ||
116 | IConfigSource config = new IniConfigSource(); | 117 | IConfigSource config = new IniConfigSource(); |
117 | IConfig modulesConfig = config.AddConfig("Modules"); | 118 | IConfig modulesConfig = config.AddConfig("Modules"); |
118 | modulesConfig.Set("EntityTransferModule", etm.Name); | 119 | modulesConfig.Set("EntityTransferModule", etmA.Name); |
119 | modulesConfig.Set("SimulationServices", lscm.Name); | 120 | modulesConfig.Set("SimulationServices", lscm.Name); |
120 | IConfig entityTransferConfig = config.AddConfig("EntityTransfer"); | 121 | IConfig entityTransferConfig = config.AddConfig("EntityTransfer"); |
121 | 122 | ||
@@ -127,7 +128,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
127 | TestScene sceneA = sh.SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000); | 128 | TestScene sceneA = sh.SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000); |
128 | TestScene sceneB = sh.SetupScene("sceneB", TestHelpers.ParseTail(0x200), 1002, 1000); | 129 | TestScene sceneB = sh.SetupScene("sceneB", TestHelpers.ParseTail(0x200), 1002, 1000); |
129 | 130 | ||
130 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, etm, lscm); | 131 | SceneHelpers.SetupSceneModules(sceneA, config, etmA); |
132 | SceneHelpers.SetupSceneModules(sceneB, config, etmB); | ||
133 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); | ||
131 | 134 | ||
132 | Vector3 teleportPosition = new Vector3(10, 11, 12); | 135 | Vector3 teleportPosition = new Vector3(10, 11, 12); |
133 | Vector3 teleportLookAt = new Vector3(20, 21, 22); | 136 | Vector3 teleportLookAt = new Vector3(20, 21, 22); |
@@ -174,12 +177,14 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
174 | UUID userId = TestHelpers.ParseTail(0x1); | 177 | UUID userId = TestHelpers.ParseTail(0x1); |
175 | Vector3 preTeleportPosition = new Vector3(30, 31, 32); | 178 | Vector3 preTeleportPosition = new Vector3(30, 31, 32); |
176 | 179 | ||
177 | EntityTransferModule etm = new EntityTransferModule(); | 180 | EntityTransferModule etmA = new EntityTransferModule(); |
181 | EntityTransferModule etmB = new EntityTransferModule(); | ||
182 | |||
178 | LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule(); | 183 | LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule(); |
179 | 184 | ||
180 | IConfigSource config = new IniConfigSource(); | 185 | IConfigSource config = new IniConfigSource(); |
181 | config.AddConfig("Modules"); | 186 | config.AddConfig("Modules"); |
182 | config.Configs["Modules"].Set("EntityTransferModule", etm.Name); | 187 | config.Configs["Modules"].Set("EntityTransferModule", etmA.Name); |
183 | config.Configs["Modules"].Set("SimulationServices", lscm.Name); | 188 | config.Configs["Modules"].Set("SimulationServices", lscm.Name); |
184 | 189 | ||
185 | config.AddConfig("EntityTransfer"); | 190 | config.AddConfig("EntityTransfer"); |
@@ -195,13 +200,15 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
195 | TestScene sceneA = sh.SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000); | 200 | TestScene sceneA = sh.SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000); |
196 | TestScene sceneB = sh.SetupScene("sceneB", TestHelpers.ParseTail(0x200), 1002, 1000); | 201 | TestScene sceneB = sh.SetupScene("sceneB", TestHelpers.ParseTail(0x200), 1002, 1000); |
197 | 202 | ||
203 | SceneHelpers.SetupSceneModules(sceneA, config, etmA ); | ||
204 | |||
198 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny | 205 | // We need to set up the permisions module on scene B so that our later use of agent limit to deny |
199 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default | 206 | // QueryAccess won't succeed anyway because administrators are always allowed in and the default |
200 | // IsAdministrator if no permissions module is present is true. | 207 | // IsAdministrator if no permissions module is present is true. |
201 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule() }); | 208 | SceneHelpers.SetupSceneModules(sceneB, config, new object[] { new PermissionsModule(), etmB }); |
202 | 209 | ||
203 | // Shared scene modules | 210 | // Shared scene modules |
204 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, etm, lscm); | 211 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); |
205 | 212 | ||
206 | Vector3 teleportPosition = new Vector3(10, 11, 12); | 213 | Vector3 teleportPosition = new Vector3(10, 11, 12); |
207 | Vector3 teleportLookAt = new Vector3(20, 21, 22); | 214 | Vector3 teleportLookAt = new Vector3(20, 21, 22); |
@@ -249,12 +256,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
249 | UUID userId = TestHelpers.ParseTail(0x1); | 256 | UUID userId = TestHelpers.ParseTail(0x1); |
250 | Vector3 preTeleportPosition = new Vector3(30, 31, 32); | 257 | Vector3 preTeleportPosition = new Vector3(30, 31, 32); |
251 | 258 | ||
252 | EntityTransferModule etm = new EntityTransferModule(); | 259 | EntityTransferModule etmA = new EntityTransferModule(); |
260 | EntityTransferModule etmB = new EntityTransferModule(); | ||
253 | LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule(); | 261 | LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule(); |
254 | 262 | ||
255 | IConfigSource config = new IniConfigSource(); | 263 | IConfigSource config = new IniConfigSource(); |
256 | config.AddConfig("Modules"); | 264 | config.AddConfig("Modules"); |
257 | config.Configs["Modules"].Set("EntityTransferModule", etm.Name); | 265 | config.Configs["Modules"].Set("EntityTransferModule", etmA.Name); |
258 | config.Configs["Modules"].Set("SimulationServices", lscm.Name); | 266 | config.Configs["Modules"].Set("SimulationServices", lscm.Name); |
259 | 267 | ||
260 | config.AddConfig("EntityTransfer"); | 268 | config.AddConfig("EntityTransfer"); |
@@ -267,8 +275,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
267 | TestScene sceneA = sh.SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000); | 275 | TestScene sceneA = sh.SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000); |
268 | TestScene sceneB = sh.SetupScene("sceneB", TestHelpers.ParseTail(0x200), 1002, 1000); | 276 | TestScene sceneB = sh.SetupScene("sceneB", TestHelpers.ParseTail(0x200), 1002, 1000); |
269 | 277 | ||
278 | SceneHelpers.SetupSceneModules(sceneA, config, etmA); | ||
279 | SceneHelpers.SetupSceneModules(sceneB, config, etmB); | ||
280 | |||
270 | // Shared scene modules | 281 | // Shared scene modules |
271 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, etm, lscm); | 282 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); |
272 | 283 | ||
273 | Vector3 teleportPosition = new Vector3(10, 11, 12); | 284 | Vector3 teleportPosition = new Vector3(10, 11, 12); |
274 | Vector3 teleportLookAt = new Vector3(20, 21, 22); | 285 | Vector3 teleportLookAt = new Vector3(20, 21, 22); |
@@ -312,12 +323,13 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
312 | 323 | ||
313 | UUID userId = TestHelpers.ParseTail(0x1); | 324 | UUID userId = TestHelpers.ParseTail(0x1); |
314 | 325 | ||
315 | EntityTransferModule etm = new EntityTransferModule(); | 326 | EntityTransferModule etmA = new EntityTransferModule(); |
327 | EntityTransferModule etmB = new EntityTransferModule(); | ||
316 | LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule(); | 328 | LocalSimulationConnectorModule lscm = new LocalSimulationConnectorModule(); |
317 | 329 | ||
318 | IConfigSource config = new IniConfigSource(); | 330 | IConfigSource config = new IniConfigSource(); |
319 | IConfig modulesConfig = config.AddConfig("Modules"); | 331 | IConfig modulesConfig = config.AddConfig("Modules"); |
320 | modulesConfig.Set("EntityTransferModule", etm.Name); | 332 | modulesConfig.Set("EntityTransferModule", etmA.Name); |
321 | modulesConfig.Set("SimulationServices", lscm.Name); | 333 | modulesConfig.Set("SimulationServices", lscm.Name); |
322 | IConfig entityTransferConfig = config.AddConfig("EntityTransfer"); | 334 | IConfig entityTransferConfig = config.AddConfig("EntityTransfer"); |
323 | 335 | ||
@@ -329,9 +341,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
329 | TestScene sceneA = sh.SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000); | 341 | TestScene sceneA = sh.SetupScene("sceneA", TestHelpers.ParseTail(0x100), 1000, 1000); |
330 | TestScene sceneB = sh.SetupScene("sceneB", TestHelpers.ParseTail(0x200), 1001, 1000); | 342 | TestScene sceneB = sh.SetupScene("sceneB", TestHelpers.ParseTail(0x200), 1001, 1000); |
331 | 343 | ||
332 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, etm, lscm); | 344 | SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); |
333 | SceneHelpers.SetupSceneModules(sceneA, new CapabilitiesModule()); | 345 | SceneHelpers.SetupSceneModules(sceneA, config, new CapabilitiesModule(), etmA); |
334 | SceneHelpers.SetupSceneModules(sceneB, new CapabilitiesModule()); | 346 | SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB); |
335 | 347 | ||
336 | Vector3 teleportPosition = new Vector3(10, 11, 12); | 348 | Vector3 teleportPosition = new Vector3(10, 11, 12); |
337 | Vector3 teleportLookAt = new Vector3(20, 21, 22); | 349 | Vector3 teleportLookAt = new Vector3(20, 21, 22); |