diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
6 files changed, 125 insertions, 58 deletions
diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs index 834464b..f555b49 100644 --- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs +++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs | |||
@@ -155,7 +155,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
155 | { | 155 | { |
156 | IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>(); | 156 | IInventoryAccessModule invAccess = m_scene.RequestModuleInterface<IInventoryAccessModule>(); |
157 | if (invAccess != null) | 157 | if (invAccess != null) |
158 | invAccess.CopyToInventory(x.action, x.folderID, x.objectGroups, x.remoteClient); | 158 | invAccess.CopyToInventory(x.action, x.folderID, x.objectGroups, x.remoteClient, false); |
159 | 159 | ||
160 | if (x.permissionToDelete) | 160 | if (x.permissionToDelete) |
161 | { | 161 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 942c625..270b01b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -954,8 +954,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
954 | sbyte invType, sbyte type, UUID olditemID) | 954 | sbyte invType, sbyte type, UUID olditemID) |
955 | { | 955 | { |
956 | // m_log.DebugFormat( | 956 | // m_log.DebugFormat( |
957 | // "[AGENT INVENTORY]: Received request from {0} to create inventory item link {1} in folder {2} pointing to {3}", | 957 | // "[AGENT INVENTORY]: Received request from {0} to create inventory item link {1} in folder {2} pointing to {3}, assetType {4}, inventoryType {5}", |
958 | // remoteClient.Name, name, folderID, olditemID); | 958 | // remoteClient.Name, name, folderID, olditemID, (AssetType)type, (InventoryType)invType); |
959 | 959 | ||
960 | if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId)) | 960 | if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId)) |
961 | return; | 961 | return; |
@@ -988,10 +988,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
988 | asset.Type = type; | 988 | asset.Type = type; |
989 | asset.Name = name; | 989 | asset.Name = name; |
990 | asset.Description = description; | 990 | asset.Description = description; |
991 | 991 | ||
992 | CreateNewInventoryItem( | 992 | CreateNewInventoryItem( |
993 | remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, name, 0, callbackID, asset, invType, | 993 | remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, name, 0, callbackID, asset, invType, |
994 | (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, | 994 | (uint)PermissionMask.All, (uint)PermissionMask.All, (uint)PermissionMask.All, |
995 | (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); | 995 | (uint)PermissionMask.All, (uint)PermissionMask.All, Util.UnixTimeSinceEpoch()); |
996 | } | 996 | } |
997 | else | 997 | else |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e3bd527..32c7262 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -77,7 +77,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
77 | public bool DebugUpdates { get; private set; } | 77 | public bool DebugUpdates { get; private set; } |
78 | 78 | ||
79 | public SynchronizeSceneHandler SynchronizeScene; | 79 | public SynchronizeSceneHandler SynchronizeScene; |
80 | public SimStatsReporter StatsReporter; | 80 | |
81 | /// <summary> | ||
82 | /// Statistical information for this scene. | ||
83 | /// </summary> | ||
84 | public SimStatsReporter StatsReporter { get; private set; } | ||
85 | |||
81 | public List<Border> NorthBorders = new List<Border>(); | 86 | public List<Border> NorthBorders = new List<Border>(); |
82 | public List<Border> EastBorders = new List<Border>(); | 87 | public List<Border> EastBorders = new List<Border>(); |
83 | public List<Border> SouthBorders = new List<Border>(); | 88 | public List<Border> SouthBorders = new List<Border>(); |
@@ -164,7 +169,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
164 | protected IConfigSource m_config; | 169 | protected IConfigSource m_config; |
165 | protected IRegionSerialiserModule m_serialiser; | 170 | protected IRegionSerialiserModule m_serialiser; |
166 | protected IDialogModule m_dialogModule; | 171 | protected IDialogModule m_dialogModule; |
167 | protected IEntityTransferModule m_teleportModule; | ||
168 | protected ICapabilitiesModule m_capsModule; | 172 | protected ICapabilitiesModule m_capsModule; |
169 | protected IGroupsModule m_groupsModule; | 173 | protected IGroupsModule m_groupsModule; |
170 | 174 | ||
@@ -515,6 +519,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
515 | } | 519 | } |
516 | 520 | ||
517 | public IAttachmentsModule AttachmentsModule { get; set; } | 521 | public IAttachmentsModule AttachmentsModule { get; set; } |
522 | public IEntityTransferModule EntityTransferModule { get; private set; } | ||
518 | 523 | ||
519 | public IAvatarFactoryModule AvatarFactory | 524 | public IAvatarFactoryModule AvatarFactory |
520 | { | 525 | { |
@@ -952,8 +957,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
952 | List<ulong> old = new List<ulong>(); | 957 | List<ulong> old = new List<ulong>(); |
953 | old.Add(otherRegion.RegionHandle); | 958 | old.Add(otherRegion.RegionHandle); |
954 | agent.DropOldNeighbours(old); | 959 | agent.DropOldNeighbours(old); |
955 | if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc) | 960 | if (EntityTransferModule != null && agent.PresenceType != PresenceType.Npc) |
956 | m_teleportModule.EnableChildAgent(agent, otherRegion); | 961 | EntityTransferModule.EnableChildAgent(agent, otherRegion); |
957 | }); | 962 | }); |
958 | } | 963 | } |
959 | catch (NullReferenceException) | 964 | catch (NullReferenceException) |
@@ -1060,13 +1065,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1060 | } | 1065 | } |
1061 | } | 1066 | } |
1062 | 1067 | ||
1068 | m_log.Error("[REGION]: Closing"); | ||
1069 | Close(); | ||
1070 | |||
1063 | if (PhysicsScene != null) | 1071 | if (PhysicsScene != null) |
1064 | { | 1072 | { |
1065 | PhysicsScene.Dispose(); | 1073 | PhysicsScene.Dispose(); |
1066 | } | 1074 | } |
1067 | |||
1068 | m_log.Error("[REGION]: Closing"); | ||
1069 | Close(); | ||
1070 | 1075 | ||
1071 | m_log.Error("[REGION]: Firing Region Restart Message"); | 1076 | m_log.Error("[REGION]: Firing Region Restart Message"); |
1072 | 1077 | ||
@@ -1090,8 +1095,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1090 | { | 1095 | { |
1091 | ForEachRootScenePresence(delegate(ScenePresence agent) | 1096 | ForEachRootScenePresence(delegate(ScenePresence agent) |
1092 | { | 1097 | { |
1093 | if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc) | 1098 | if (EntityTransferModule != null && agent.PresenceType != PresenceType.Npc) |
1094 | m_teleportModule.EnableChildAgent(agent, r); | 1099 | EntityTransferModule.EnableChildAgent(agent, r); |
1095 | }); | 1100 | }); |
1096 | } | 1101 | } |
1097 | catch (NullReferenceException) | 1102 | catch (NullReferenceException) |
@@ -1281,7 +1286,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1281 | m_serialiser = RequestModuleInterface<IRegionSerialiserModule>(); | 1286 | m_serialiser = RequestModuleInterface<IRegionSerialiserModule>(); |
1282 | m_dialogModule = RequestModuleInterface<IDialogModule>(); | 1287 | m_dialogModule = RequestModuleInterface<IDialogModule>(); |
1283 | m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); | 1288 | m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); |
1284 | m_teleportModule = RequestModuleInterface<IEntityTransferModule>(); | 1289 | EntityTransferModule = RequestModuleInterface<IEntityTransferModule>(); |
1285 | m_groupsModule = RequestModuleInterface<IGroupsModule>(); | 1290 | m_groupsModule = RequestModuleInterface<IGroupsModule>(); |
1286 | } | 1291 | } |
1287 | 1292 | ||
@@ -2380,8 +2385,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2380 | return; | 2385 | return; |
2381 | } | 2386 | } |
2382 | 2387 | ||
2383 | if (m_teleportModule != null) | 2388 | if (EntityTransferModule != null) |
2384 | m_teleportModule.Cross(grp, attemptedPosition, silent); | 2389 | EntityTransferModule.Cross(grp, attemptedPosition, silent); |
2385 | } | 2390 | } |
2386 | 2391 | ||
2387 | public Border GetCrossedBorder(Vector3 position, Cardinals gridline) | 2392 | public Border GetCrossedBorder(Vector3 position, Cardinals gridline) |
@@ -3225,8 +3230,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3225 | /// <param name="client">The IClientAPI for the client</param> | 3230 | /// <param name="client">The IClientAPI for the client</param> |
3226 | public virtual bool TeleportClientHome(UUID agentId, IClientAPI client) | 3231 | public virtual bool TeleportClientHome(UUID agentId, IClientAPI client) |
3227 | { | 3232 | { |
3228 | if (m_teleportModule != null) | 3233 | if (EntityTransferModule != null) |
3229 | return m_teleportModule.TeleportHome(agentId, client); | 3234 | { |
3235 | EntityTransferModule.TeleportHome(agentId, client); | ||
3236 | } | ||
3230 | else | 3237 | else |
3231 | { | 3238 | { |
3232 | m_log.DebugFormat("[SCENE]: Unable to teleport user home: no AgentTransferModule is active"); | 3239 | m_log.DebugFormat("[SCENE]: Unable to teleport user home: no AgentTransferModule is active"); |
@@ -4332,8 +4339,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4332 | position.Y -= shifty; | 4339 | position.Y -= shifty; |
4333 | } | 4340 | } |
4334 | 4341 | ||
4335 | if (m_teleportModule != null) | 4342 | if (EntityTransferModule != null) |
4336 | m_teleportModule.Teleport(sp, regionHandle, position, lookAt, teleportFlags); | 4343 | { |
4344 | EntityTransferModule.Teleport(sp, regionHandle, position, lookAt, teleportFlags); | ||
4345 | } | ||
4337 | else | 4346 | else |
4338 | { | 4347 | { |
4339 | m_log.DebugFormat("[SCENE]: Unable to perform teleports: no AgentTransferModule is active"); | 4348 | m_log.DebugFormat("[SCENE]: Unable to perform teleports: no AgentTransferModule is active"); |
@@ -4344,8 +4353,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4344 | 4353 | ||
4345 | public bool CrossAgentToNewRegion(ScenePresence agent, bool isFlying) | 4354 | public bool CrossAgentToNewRegion(ScenePresence agent, bool isFlying) |
4346 | { | 4355 | { |
4347 | if (m_teleportModule != null) | 4356 | if (EntityTransferModule != null) |
4348 | return m_teleportModule.Cross(agent, isFlying); | 4357 | { |
4358 | return EntityTransferModule.Cross(agent, isFlying); | ||
4359 | } | ||
4349 | else | 4360 | else |
4350 | { | 4361 | { |
4351 | m_log.DebugFormat("[SCENE]: Unable to cross agent to neighbouring region, because there is no AgentTransferModule"); | 4362 | m_log.DebugFormat("[SCENE]: Unable to cross agent to neighbouring region, because there is no AgentTransferModule"); |
@@ -5493,16 +5504,36 @@ Environment.Exit(1); | |||
5493 | throw new Exception(error); | 5504 | throw new Exception(error); |
5494 | } | 5505 | } |
5495 | 5506 | ||
5496 | // This method is called across the simulation connector to | 5507 | /// <summary> |
5497 | // determine if a given agent is allowed in this region | 5508 | /// This method is called across the simulation connector to |
5498 | // AS A ROOT AGENT. Returning false here will prevent them | 5509 | /// determine if a given agent is allowed in this region |
5499 | // from logging into the region, teleporting into the region | 5510 | /// AS A ROOT AGENT |
5500 | // or corssing the broder walking, but will NOT prevent | 5511 | /// </summary> |
5501 | // child agent creation, thereby emulating the SL behavior. | 5512 | /// <remarks> |
5513 | /// Returning false here will prevent them | ||
5514 | /// from logging into the region, teleporting into the region | ||
5515 | /// or corssing the broder walking, but will NOT prevent | ||
5516 | /// child agent creation, thereby emulating the SL behavior. | ||
5517 | /// </remarks> | ||
5518 | /// <param name='agentID'></param> | ||
5519 | /// <param name='position'></param> | ||
5520 | /// <param name='reason'></param> | ||
5521 | /// <returns></returns> | ||
5502 | public bool QueryAccess(UUID agentID, Vector3 position, out string reason) | 5522 | public bool QueryAccess(UUID agentID, Vector3 position, out string reason) |
5503 | { | 5523 | { |
5504 | reason = "You are banned from the region"; | 5524 | reason = "You are banned from the region"; |
5505 | 5525 | ||
5526 | if (EntityTransferModule.IsInTransit(agentID)) | ||
5527 | { | ||
5528 | reason = "Agent is still in transit from this region"; | ||
5529 | |||
5530 | m_log.WarnFormat( | ||
5531 | "[SCENE]: Denying agent {0} entry into {1} since region still has them registered as in transit", | ||
5532 | agentID, RegionInfo.RegionName); | ||
5533 | |||
5534 | return false; | ||
5535 | } | ||
5536 | |||
5506 | if (Permissions.IsGod(agentID)) | 5537 | if (Permissions.IsGod(agentID)) |
5507 | { | 5538 | { |
5508 | reason = String.Empty; | 5539 | reason = String.Empty; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 141cf66..f5b9825 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -759,14 +759,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
759 | return item; | 759 | return item; |
760 | } | 760 | } |
761 | 761 | ||
762 | /// <summary> | 762 | public TaskInventoryItem GetInventoryItem(string name) |
763 | /// Get inventory items by name. | 763 | { |
764 | /// </summary> | 764 | m_items.LockItemsForRead(true); |
765 | /// <param name="name"></param> | 765 | foreach (TaskInventoryItem item in m_items.Values) |
766 | /// <returns> | 766 | { |
767 | /// A list of inventory items with that name. | 767 | if (item.Name == name) |
768 | /// If no inventory item has that name then an empty list is returned. | 768 | { |
769 | /// </returns> | 769 | return item; |
770 | m_items.LockItemsForRead(false); | ||
771 | } | ||
772 | } | ||
773 | m_items.LockItemsForRead(false); | ||
774 | |||
775 | return null; | ||
776 | } | ||
777 | |||
770 | public List<TaskInventoryItem> GetInventoryItems(string name) | 778 | public List<TaskInventoryItem> GetInventoryItems(string name) |
771 | { | 779 | { |
772 | List<TaskInventoryItem> items = new List<TaskInventoryItem>(); | 780 | List<TaskInventoryItem> items = new List<TaskInventoryItem>(); |
@@ -1236,10 +1244,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1236 | if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0) | 1244 | if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0) |
1237 | item.CurrentPermissions &= ~(uint)PermissionMask.Modify; | 1245 | item.CurrentPermissions &= ~(uint)PermissionMask.Modify; |
1238 | } | 1246 | } |
1239 | item.OwnerChanged = true; | ||
1240 | item.CurrentPermissions &= item.NextPermissions; | 1247 | item.CurrentPermissions &= item.NextPermissions; |
1241 | item.BasePermissions &= item.NextPermissions; | 1248 | item.BasePermissions &= item.NextPermissions; |
1242 | item.EveryonePermissions &= item.NextPermissions; | 1249 | item.EveryonePermissions &= item.NextPermissions; |
1250 | item.OwnerChanged = true; | ||
1243 | item.PermsMask = 0; | 1251 | item.PermsMask = 0; |
1244 | item.PermsGranter = UUID.Zero; | 1252 | item.PermsGranter = UUID.Zero; |
1245 | } | 1253 | } |
@@ -1432,4 +1440,4 @@ namespace OpenSim.Region.Framework.Scenes | |||
1432 | } | 1440 | } |
1433 | } | 1441 | } |
1434 | } | 1442 | } |
1435 | } \ No newline at end of file | 1443 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs index 55455cc..a4f730d 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/CoalescedSceneObjectsSerializer.cs | |||
@@ -47,14 +47,30 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
47 | /// </remarks> | 47 | /// </remarks> |
48 | public class CoalescedSceneObjectsSerializer | 48 | public class CoalescedSceneObjectsSerializer |
49 | { | 49 | { |
50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 50 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// Serialize coalesced objects to Xml | 53 | /// Serialize coalesced objects to Xml |
54 | /// </summary> | 54 | /// </summary> |
55 | /// <param name="coa"></param> | 55 | /// <param name="coa"></param> |
56 | /// <param name="doScriptStates"> | ||
57 | /// If true then serialize script states. This will halt any running scripts | ||
58 | /// </param> | ||
56 | /// <returns></returns> | 59 | /// <returns></returns> |
57 | public static string ToXml(CoalescedSceneObjects coa) | 60 | public static string ToXml(CoalescedSceneObjects coa) |
61 | { | ||
62 | return ToXml(coa, true); | ||
63 | } | ||
64 | |||
65 | /// <summary> | ||
66 | /// Serialize coalesced objects to Xml | ||
67 | /// </summary> | ||
68 | /// <param name="coa"></param> | ||
69 | /// <param name="doScriptStates"> | ||
70 | /// If true then serialize script states. This will halt any running scripts | ||
71 | /// </param> | ||
72 | /// <returns></returns> | ||
73 | public static string ToXml(CoalescedSceneObjects coa, bool doScriptStates) | ||
58 | { | 74 | { |
59 | using (StringWriter sw = new StringWriter()) | 75 | using (StringWriter sw = new StringWriter()) |
60 | { | 76 | { |
@@ -91,7 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
91 | writer.WriteAttributeString("offsety", offsets[i].Y.ToString()); | 107 | writer.WriteAttributeString("offsety", offsets[i].Y.ToString()); |
92 | writer.WriteAttributeString("offsetz", offsets[i].Z.ToString()); | 108 | writer.WriteAttributeString("offsetz", offsets[i].Z.ToString()); |
93 | 109 | ||
94 | SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, true); | 110 | SceneObjectSerializer.ToOriginalXmlFormat(obj, writer, doScriptStates); |
95 | 111 | ||
96 | writer.WriteEndElement(); // SceneObjectGroup | 112 | writer.WriteEndElement(); // SceneObjectGroup |
97 | } | 113 | } |
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); |