diff options
author | Justin Clark-Casey (justincc) | 2012-06-08 00:40:38 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-06-08 00:40:38 +0100 |
commit | d547bcf8d15bdcb8604cf170dc8ec1e14ad4cdc0 (patch) | |
tree | 6d218ba2e89e39d05c8e1f0ccba5cef943ad822d /OpenSim/Region/Framework | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-d547bcf8d15bdcb8604cf170dc8ec1e14ad4cdc0.zip opensim-SC-d547bcf8d15bdcb8604cf170dc8ec1e14ad4cdc0.tar.gz opensim-SC-d547bcf8d15bdcb8604cf170dc8ec1e14ad4cdc0.tar.bz2 opensim-SC-d547bcf8d15bdcb8604cf170dc8ec1e14ad4cdc0.tar.xz |
Remove duplicate update of user count in Scene.IncomingCloseAgent()
This is already done in Scene.RemoveClient() which IncomingCloseAgent() always ends up calling.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs | 23 |
3 files changed, 27 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 17503b1..9048f00 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4039,16 +4039,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4039 | ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); | 4039 | ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); |
4040 | if (presence != null) | 4040 | if (presence != null) |
4041 | { | 4041 | { |
4042 | // Nothing is removed here, so down count it as such | ||
4043 | if (presence.IsChildAgent) | ||
4044 | { | ||
4045 | m_sceneGraph.removeUserCount(false); | ||
4046 | } | ||
4047 | else | ||
4048 | { | ||
4049 | m_sceneGraph.removeUserCount(true); | ||
4050 | } | ||
4051 | |||
4052 | presence.ControllingClient.Close(); | 4042 | presence.ControllingClient.Close(); |
4053 | return true; | 4043 | return true; |
4054 | } | 4044 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index ddf1550..82a4f64 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -703,10 +703,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
703 | public int GetChildAgentCount() | 703 | public int GetChildAgentCount() |
704 | { | 704 | { |
705 | // some network situations come in where child agents get closed twice. | 705 | // some network situations come in where child agents get closed twice. |
706 | if (m_numChildAgents < 0) | 706 | // if (m_numChildAgents < 0) |
707 | { | 707 | // { |
708 | m_numChildAgents = 0; | 708 | // m_numChildAgents = 0; |
709 | } | 709 | // } |
710 | 710 | ||
711 | return m_numChildAgents; | 711 | return m_numChildAgents; |
712 | } | 712 | } |
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 |