aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs15
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs6
3 files changed, 11 insertions, 22 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)
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index c4547f2..2f1cdc1 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -175,18 +175,8 @@ namespace OpenSim.Region.Framework.Scenes
175 175
176 #region Add/Remove Agent/Avatar 176 #region Add/Remove Agent/Avatar
177 177
178 /// <summary>
179 /// Register the new client with the scene. The client starts off as a child agent - the later agent crossing
180 /// will promote it to a root agent during login.
181 /// </summary>
182 /// <param name="client"></param
183 public abstract void AddNewClient(IClientAPI client); 178 public abstract void AddNewClient(IClientAPI client);
184 179 public abstract void RemoveClient(UUID agentID, bool closeChildAgents);
185 /// <summary>
186 /// Remove a client from the scene
187 /// </summary>
188 /// <param name="agentID"></param>
189 public abstract void RemoveClient(UUID agentID);
190 180
191 public bool TryGetScenePresence(UUID agentID, out object scenePresence) 181 public bool TryGetScenePresence(UUID agentID, out object scenePresence)
192 { 182 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index af28dd9..2db83eb 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1146,12 +1146,12 @@ namespace OpenSim.Region.Framework.Scenes
1146 /// Complete Avatar's movement into the region. 1146 /// Complete Avatar's movement into the region.
1147 /// </summary> 1147 /// </summary>
1148 /// <param name="client"></param> 1148 /// <param name="client"></param>
1149 /// <param name="enableNeighbourChildAgents"> 1149 /// <param name="openChildAgents">
1150 /// If true, send notification to neighbour regions to expect 1150 /// If true, send notification to neighbour regions to expect
1151 /// a child agent from the client. These neighbours can be some distance away, depending right now on the 1151 /// a child agent from the client. These neighbours can be some distance away, depending right now on the
1152 /// configuration of DefaultDrawDistance in the [Startup] section of config 1152 /// configuration of DefaultDrawDistance in the [Startup] section of config
1153 /// </param> 1153 /// </param>
1154 public void CompleteMovement(IClientAPI client, bool enableNeighbourChildAgents) 1154 public void CompleteMovement(IClientAPI client, bool openChildAgents)
1155 { 1155 {
1156// DateTime startTime = DateTime.Now; 1156// DateTime startTime = DateTime.Now;
1157 1157
@@ -1192,7 +1192,7 @@ namespace OpenSim.Region.Framework.Scenes
1192 SendInitialData(); 1192 SendInitialData();
1193 1193
1194 // Create child agents in neighbouring regions 1194 // Create child agents in neighbouring regions
1195 if (enableNeighbourChildAgents && !m_isChildAgent) 1195 if (openChildAgents && !m_isChildAgent)
1196 { 1196 {
1197 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); 1197 IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
1198 if (m_agentTransfer != null) 1198 if (m_agentTransfer != null)