aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs15
1 files changed, 7 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index b3b6cbc..9aa9bf5 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3091,11 +3091,7 @@ namespace OpenSim.Region.Framework.Scenes
3091 } 3091 }
3092 } 3092 }
3093 3093
3094 /// <summary> 3094 public override void RemoveClient(UUID agentID, bool closeChildAgents)
3095 /// Remove the given client from the scene.
3096 /// </summary>
3097 /// <param name="agentID"></param>
3098 public override void RemoveClient(UUID agentID)
3099 { 3095 {
3100 CheckHeartbeat(); 3096 CheckHeartbeat();
3101 bool childagentYN = false; 3097 bool childagentYN = false;
@@ -3116,15 +3112,17 @@ namespace OpenSim.Region.Framework.Scenes
3116 (childagentYN ? "child" : "root"), agentID, RegionInfo.RegionName); 3112 (childagentYN ? "child" : "root"), agentID, RegionInfo.RegionName);
3117 3113
3118 m_sceneGraph.removeUserCount(!childagentYN); 3114 m_sceneGraph.removeUserCount(!childagentYN);
3119 3115
3120 if (CapsModule != null) 3116 // TODO: We shouldn't use closeChildAgents here - it's being used by the NPC module to stop
3117 // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI
3118 if (closeChildAgents && CapsModule != null)
3121 CapsModule.RemoveCaps(agentID); 3119 CapsModule.RemoveCaps(agentID);
3122 3120
3123 // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever 3121 // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever
3124 // this method is doing is HORRIBLE!!! 3122 // this method is doing is HORRIBLE!!!
3125 avatar.Scene.NeedSceneCacheClear(avatar.UUID); 3123 avatar.Scene.NeedSceneCacheClear(avatar.UUID);
3126 3124
3127 if (!avatar.IsChildAgent) 3125 if (closeChildAgents && !avatar.IsChildAgent)
3128 { 3126 {
3129 //List<ulong> childknownRegions = new List<ulong>(); 3127 //List<ulong> childknownRegions = new List<ulong>();
3130 //List<ulong> ckn = avatar.KnownChildRegionHandles; 3128 //List<ulong> ckn = avatar.KnownChildRegionHandles;
@@ -3136,6 +3134,7 @@ namespace OpenSim.Region.Framework.Scenes
3136 regions.Remove(RegionInfo.RegionHandle); 3134 regions.Remove(RegionInfo.RegionHandle);
3137 m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); 3135 m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);
3138 } 3136 }
3137
3139 m_eventManager.TriggerClientClosed(agentID, this); 3138 m_eventManager.TriggerClientClosed(agentID, this);
3140 } 3139 }
3141 catch (NullReferenceException) 3140 catch (NullReferenceException)