aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2012-06-08 00:43:39 +0100
committerMelanie2012-06-08 00:43:39 +0100
commit48add77a4c985858794c2c3a9d7ea63a31921528 (patch)
tree7757e425e3d9e93d742c51e3f39bee57be04546b /OpenSim
parentMerge branch 'master' into careminster (diff)
parentGo back to calling IncomingCloseAgent() in the "kick user" command for consis... (diff)
downloadopensim-SC-48add77a4c985858794c2c3a9d7ea63a31921528.zip
opensim-SC-48add77a4c985858794c2c3a9d7ea63a31921528.tar.gz
opensim-SC-48add77a4c985858794c2c3a9d7ea63a31921528.tar.bz2
opensim-SC-48add77a4c985858794c2c3a9d7ea63a31921528.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs23
4 files changed, 24 insertions, 17 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 220b9c8..591259b 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -486,7 +486,7 @@ namespace OpenSim
486 else 486 else
487 presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n"); 487 presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n");
488 488
489 presence.ControllingClient.Close(); 489 presence.Scene.IncomingCloseAgent(presence.UUID);
490 } 490 }
491 } 491 }
492 492
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a77f26b..a804e29 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4233,16 +4233,6 @@ namespace OpenSim.Region.Framework.Scenes
4233 ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); 4233 ScenePresence presence = m_sceneGraph.GetScenePresence(agentID);
4234 if (presence != null) 4234 if (presence != null)
4235 { 4235 {
4236 // Nothing is removed here, so down count it as such
4237 if (presence.IsChildAgent)
4238 {
4239 m_sceneGraph.removeUserCount(false);
4240 }
4241 else if (!childOnly)
4242 {
4243 m_sceneGraph.removeUserCount(true);
4244 }
4245
4246 presence.ControllingClient.Close(); 4236 presence.ControllingClient.Close();
4247 return true; 4237 return true;
4248 } 4238 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index a62c1ac..4c12496 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -782,12 +782,6 @@ namespace OpenSim.Region.Framework.Scenes
782 782
783 public int GetChildAgentCount() 783 public int GetChildAgentCount()
784 { 784 {
785 // some network situations come in where child agents get closed twice.
786 if (m_numChildAgents < 0)
787 {
788 m_numChildAgents = 0;
789 }
790
791 return m_numChildAgents; 785 return m_numChildAgents;
792 } 786 }
793 787
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
index ccfe4ff..a407f01 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -97,6 +97,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
97 97
98 Assert.That(sp.AbsolutePosition, Is.EqualTo(teleportPosition)); 98 Assert.That(sp.AbsolutePosition, Is.EqualTo(teleportPosition));
99 99
100 Assert.That(scene.GetRootAgentCount(), Is.EqualTo(1));
101 Assert.That(scene.GetChildAgentCount(), Is.EqualTo(0));
102
100 // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera 103 // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera
101 // position instead). 104 // position instead).
102// Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt)); 105// Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt));
@@ -158,6 +161,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
158 Assert.That(sceneBSp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneB.RegionInfo.RegionName)); 161 Assert.That(sceneBSp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneB.RegionInfo.RegionName));
159 Assert.That(sceneBSp.AbsolutePosition, Is.EqualTo(teleportPosition)); 162 Assert.That(sceneBSp.AbsolutePosition, Is.EqualTo(teleportPosition));
160 163
164 Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(0));
165 Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
166 Assert.That(sceneB.GetRootAgentCount(), Is.EqualTo(1));
167 Assert.That(sceneB.GetChildAgentCount(), Is.EqualTo(0));
168
161 // TODO: Add assertions to check correct circuit details in both scenes. 169 // TODO: Add assertions to check correct circuit details in both scenes.
162 170
163 // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera 171 // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera
@@ -235,6 +243,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
235 Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName)); 243 Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName));
236 Assert.That(sceneASp.AbsolutePosition, Is.EqualTo(preTeleportPosition)); 244 Assert.That(sceneASp.AbsolutePosition, Is.EqualTo(preTeleportPosition));
237 245
246 Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(1));
247 Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
248 Assert.That(sceneB.GetRootAgentCount(), Is.EqualTo(0));
249 Assert.That(sceneB.GetChildAgentCount(), Is.EqualTo(0));
250
238 // TODO: Add assertions to check correct circuit details in both scenes. 251 // TODO: Add assertions to check correct circuit details in both scenes.
239 252
240 // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera 253 // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera
@@ -306,6 +319,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
306 Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName)); 319 Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName));
307 Assert.That(sceneASp.AbsolutePosition, Is.EqualTo(preTeleportPosition)); 320 Assert.That(sceneASp.AbsolutePosition, Is.EqualTo(preTeleportPosition));
308 321
322 Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(1));
323 Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
324 Assert.That(sceneB.GetRootAgentCount(), Is.EqualTo(0));
325 Assert.That(sceneB.GetChildAgentCount(), Is.EqualTo(0));
326
309 // TODO: Add assertions to check correct circuit details in both scenes. 327 // TODO: Add assertions to check correct circuit details in both scenes.
310 328
311 // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera 329 // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera
@@ -382,6 +400,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
382 Assert.That(afterSceneBSp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneB.RegionInfo.RegionName)); 400 Assert.That(afterSceneBSp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneB.RegionInfo.RegionName));
383 Assert.That(afterSceneBSp.AbsolutePosition, Is.EqualTo(teleportPosition)); 401 Assert.That(afterSceneBSp.AbsolutePosition, Is.EqualTo(teleportPosition));
384 402
403 Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(0));
404 Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(1));
405 Assert.That(sceneB.GetRootAgentCount(), Is.EqualTo(1));
406 Assert.That(sceneB.GetChildAgentCount(), Is.EqualTo(0));
407
385 // TODO: Add assertions to check correct circuit details in both scenes. 408 // TODO: Add assertions to check correct circuit details in both scenes.
386 409
387 // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera 410 // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera