aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-05-17 23:33:26 +0100
committerJustin Clark-Casey (justincc)2012-05-17 23:33:26 +0100
commit4d34763f8c90dfe87a8a5930bf05fe36b86d15df (patch)
tree639b53816b54241e75b809c006ce77866acf3a92 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentminor: improve method doc for TestSameSimulatorSeparatedRegionsCreateAgentFai... (diff)
downloadopensim-SC-4d34763f8c90dfe87a8a5930bf05fe36b86d15df.zip
opensim-SC-4d34763f8c90dfe87a8a5930bf05fe36b86d15df.tar.gz
opensim-SC-4d34763f8c90dfe87a8a5930bf05fe36b86d15df.tar.bz2
opensim-SC-4d34763f8c90dfe87a8a5930bf05fe36b86d15df.tar.xz
Check agent limit against root agent count rather than both root and child agents
From sl docs such as http://community.secondlife.com/t5/English-Knowledge-Base/Managing-Private-Regions/ta-p/700115 agent should apply to avatars only. This makes sense from a user perspective, and also from a code perspective since child agents with no physics or actions take up a fraction of root agent resources. As such, the check is now only performed in Scene.QueryAccess() - cross and teleport check this before allowing an agent to translocate. This also removes an off-by-one error that could occur in certain circumstances on teleport when a new child agent was double counted when a pre-teleport agent update was performed. This does not affect an existing bug where limits or other QueryAccess() checks are not applied to avatars logging directly into a region.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index bdcef71..558fd9c 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1169,6 +1169,12 @@ namespace OpenSim.Region.Framework.Scenes
1169 Scene.SimulationService.ReleaseAgent(m_originRegionID, UUID, m_callbackURI); 1169 Scene.SimulationService.ReleaseAgent(m_originRegionID, UUID, m_callbackURI);
1170 m_callbackURI = null; 1170 m_callbackURI = null;
1171 } 1171 }
1172// else
1173// {
1174// m_log.DebugFormat(
1175// "[SCENE PRESENCE]: No callback provided on CompleteMovement of {0} {1} to {2}",
1176// client.Name, client.AgentId, m_scene.RegionInfo.RegionName);
1177// }
1172 1178
1173 ValidateAndSendAppearanceAndAgentData(); 1179 ValidateAndSendAppearanceAndAgentData();
1174 1180
@@ -2508,7 +2514,7 @@ namespace OpenSim.Region.Framework.Scenes
2508 // If we are using the the cached appearance then send it out to everyone 2514 // If we are using the the cached appearance then send it out to everyone
2509 if (cachedappearance) 2515 if (cachedappearance)
2510 { 2516 {
2511 m_log.DebugFormat("[SCENEPRESENCE]: baked textures are in the cache for {0}", Name); 2517 m_log.DebugFormat("[SCENE PRESENCE]: baked textures are in the cache for {0}", Name);
2512 2518
2513 // If the avatars baked textures are all in the cache, then we have a 2519 // If the avatars baked textures are all in the cache, then we have a
2514 // complete appearance... send it out, if not, then we'll send it when 2520 // complete appearance... send it out, if not, then we'll send it when
@@ -2970,7 +2976,7 @@ namespace OpenSim.Region.Framework.Scenes
2970 2976
2971 public void ChildAgentDataUpdate(AgentData cAgentData) 2977 public void ChildAgentDataUpdate(AgentData cAgentData)
2972 { 2978 {
2973 //m_log.Debug(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName); 2979// m_log.Debug(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
2974 if (!IsChildAgent) 2980 if (!IsChildAgent)
2975 return; 2981 return;
2976 2982
@@ -3110,6 +3116,9 @@ namespace OpenSim.Region.Framework.Scenes
3110 m_originRegionID = cAgent.RegionID; 3116 m_originRegionID = cAgent.RegionID;
3111 3117
3112 m_callbackURI = cAgent.CallbackURI; 3118 m_callbackURI = cAgent.CallbackURI;
3119// m_log.DebugFormat(
3120// "[SCENE PRESENCE]: Set callback for {0} in {1} to {2} in CopyFrom()",
3121// Name, m_scene.RegionInfo.RegionName, m_callbackURI);
3113 3122
3114 m_pos = cAgent.Position; 3123 m_pos = cAgent.Position;
3115 m_velocity = cAgent.Velocity; 3124 m_velocity = cAgent.Velocity;