aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs3
2 files changed, 13 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 385febf..d449116 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -500,6 +500,7 @@ namespace OpenSim.Region.Framework.Scenes
500 public IAttachmentsModule AttachmentsModule { get; set; } 500 public IAttachmentsModule AttachmentsModule { get; set; }
501 public IEntityTransferModule EntityTransferModule { get; private set; } 501 public IEntityTransferModule EntityTransferModule { get; private set; }
502 public IAgentAssetTransactions AgentTransactionsModule { get; private set; } 502 public IAgentAssetTransactions AgentTransactionsModule { get; private set; }
503 public IUserManagement UserManagementModule { get; private set; }
503 504
504 public IAvatarFactoryModule AvatarFactory 505 public IAvatarFactoryModule AvatarFactory
505 { 506 {
@@ -1243,6 +1244,7 @@ namespace OpenSim.Region.Framework.Scenes
1243 EntityTransferModule = RequestModuleInterface<IEntityTransferModule>(); 1244 EntityTransferModule = RequestModuleInterface<IEntityTransferModule>();
1244 m_groupsModule = RequestModuleInterface<IGroupsModule>(); 1245 m_groupsModule = RequestModuleInterface<IGroupsModule>();
1245 AgentTransactionsModule = RequestModuleInterface<IAgentAssetTransactions>(); 1246 AgentTransactionsModule = RequestModuleInterface<IAgentAssetTransactions>();
1247 UserManagementModule = RequestModuleInterface<IUserManagement>();
1246 } 1248 }
1247 1249
1248 #endregion 1250 #endregion
@@ -2021,9 +2023,8 @@ namespace OpenSim.Region.Framework.Scenes
2021 sceneObject.SetGroup(groupID, null); 2023 sceneObject.SetGroup(groupID, null);
2022 } 2024 }
2023 2025
2024 IUserManagement uman = RequestModuleInterface<IUserManagement>(); 2026 if (UserManagementModule != null)
2025 if (uman != null) 2027 sceneObject.RootPart.CreatorIdentification = UserManagementModule.GetUserUUI(ownerID);
2026 sceneObject.RootPart.CreatorIdentification = uman.GetUserUUI(ownerID);
2027 2028
2028 sceneObject.ScheduleGroupForFullUpdate(); 2029 sceneObject.ScheduleGroupForFullUpdate();
2029 2030
@@ -2711,14 +2712,13 @@ namespace OpenSim.Region.Framework.Scenes
2711 /// <param name="aCircuit"></param> 2712 /// <param name="aCircuit"></param>
2712 private void CacheUserName(ScenePresence sp, AgentCircuitData aCircuit) 2713 private void CacheUserName(ScenePresence sp, AgentCircuitData aCircuit)
2713 { 2714 {
2714 IUserManagement uMan = RequestModuleInterface<IUserManagement>(); 2715 if (UserManagementModule != null)
2715 if (uMan != null)
2716 { 2716 {
2717 string first = aCircuit.firstname, last = aCircuit.lastname; 2717 string first = aCircuit.firstname, last = aCircuit.lastname;
2718 2718
2719 if (sp.PresenceType == PresenceType.Npc) 2719 if (sp.PresenceType == PresenceType.Npc)
2720 { 2720 {
2721 uMan.AddUser(aCircuit.AgentID, first, last); 2721 UserManagementModule.AddUser(aCircuit.AgentID, first, last);
2722 } 2722 }
2723 else 2723 else
2724 { 2724 {
@@ -2737,7 +2737,7 @@ namespace OpenSim.Region.Framework.Scenes
2737 } 2737 }
2738 } 2738 }
2739 2739
2740 uMan.AddUser(aCircuit.AgentID, first, last, homeURL); 2740 UserManagementModule.AddUser(aCircuit.AgentID, first, last, homeURL);
2741 } 2741 }
2742 } 2742 }
2743 } 2743 }
@@ -3292,17 +3292,19 @@ namespace OpenSim.Region.Framework.Scenes
3292 3292
3293 if (!isChildAgent) 3293 if (!isChildAgent)
3294 { 3294 {
3295 if (AttachmentsModule != null && avatar.PresenceType != PresenceType.Npc) 3295 if (AttachmentsModule != null)
3296 { 3296 {
3297 IUserManagement uMan = RequestModuleInterface<IUserManagement>();
3298 // Don't save attachments for HG visitors, it 3297 // Don't save attachments for HG visitors, it
3299 // messes up their inventory. When a HG visitor logs 3298 // messes up their inventory. When a HG visitor logs
3300 // out on a foreign grid, their attachments will be 3299 // out on a foreign grid, their attachments will be
3301 // reloaded in the state they were in when they left 3300 // reloaded in the state they were in when they left
3302 // the home grid. This is best anyway as the visited 3301 // the home grid. This is best anyway as the visited
3303 // grid may use an incompatible script engine. 3302 // grid may use an incompatible script engine.
3304 if (uMan == null || uMan.IsLocalGridUser(avatar.UUID)) 3303 bool saveChanged
3305 AttachmentsModule.SaveChangedAttachments(avatar, false); 3304 = avatar.PresenceType != PresenceType.Npc
3305 && (UserManagementModule == null || UserManagementModule.IsLocalGridUser(avatar.UUID));
3306
3307 AttachmentsModule.DeRezAttachments(avatar, saveChanged, false);
3306 } 3308 }
3307 3309
3308 ForEachClient( 3310 ForEachClient(
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 3909fd4..909c7c8 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3416,9 +3416,6 @@ namespace OpenSim.Region.Framework.Scenes
3416 3416
3417 public void Close() 3417 public void Close()
3418 { 3418 {
3419 if (!IsChildAgent && m_scene.AttachmentsModule != null)
3420 m_scene.AttachmentsModule.DeleteAttachmentsFromScene(this, false);
3421
3422 // Clear known regions 3419 // Clear known regions
3423 KnownRegions = new Dictionary<ulong, string>(); 3420 KnownRegions = new Dictionary<ulong, string>();
3424 3421