Merge branch 'master' into careminster

Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
avinationmerge
Melanie 2012-06-08 00:43:39 +01:00
commit 48add77a4c
4 changed files with 24 additions and 17 deletions

View File

@ -486,7 +486,7 @@ namespace OpenSim
else
presence.ControllingClient.Kick("\nYou have been logged out by an administrator.\n");
presence.ControllingClient.Close();
presence.Scene.IncomingCloseAgent(presence.UUID);
}
}

View File

@ -4233,16 +4233,6 @@ namespace OpenSim.Region.Framework.Scenes
ScenePresence presence = m_sceneGraph.GetScenePresence(agentID);
if (presence != null)
{
// Nothing is removed here, so down count it as such
if (presence.IsChildAgent)
{
m_sceneGraph.removeUserCount(false);
}
else if (!childOnly)
{
m_sceneGraph.removeUserCount(true);
}
presence.ControllingClient.Close();
return true;
}

View File

@ -782,12 +782,6 @@ namespace OpenSim.Region.Framework.Scenes
public int GetChildAgentCount()
{
// some network situations come in where child agents get closed twice.
if (m_numChildAgents < 0)
{
m_numChildAgents = 0;
}
return m_numChildAgents;
}

View File

@ -97,6 +97,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(sp.AbsolutePosition, Is.EqualTo(teleportPosition));
Assert.That(scene.GetRootAgentCount(), Is.EqualTo(1));
Assert.That(scene.GetChildAgentCount(), Is.EqualTo(0));
// Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera
// position instead).
// Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt));
@ -158,6 +161,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests
Assert.That(sceneBSp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneB.RegionInfo.RegionName));
Assert.That(sceneBSp.AbsolutePosition, Is.EqualTo(teleportPosition));
Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(0));
Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
Assert.That(sceneB.GetRootAgentCount(), Is.EqualTo(1));
Assert.That(sceneB.GetChildAgentCount(), Is.EqualTo(0));
// TODO: Add assertions to check correct circuit details in both scenes.
// 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
Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName));
Assert.That(sceneASp.AbsolutePosition, Is.EqualTo(preTeleportPosition));
Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(1));
Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
Assert.That(sceneB.GetRootAgentCount(), Is.EqualTo(0));
Assert.That(sceneB.GetChildAgentCount(), Is.EqualTo(0));
// TODO: Add assertions to check correct circuit details in both scenes.
// 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
Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName));
Assert.That(sceneASp.AbsolutePosition, Is.EqualTo(preTeleportPosition));
Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(1));
Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0));
Assert.That(sceneB.GetRootAgentCount(), Is.EqualTo(0));
Assert.That(sceneB.GetChildAgentCount(), Is.EqualTo(0));
// TODO: Add assertions to check correct circuit details in both scenes.
// 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
Assert.That(afterSceneBSp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneB.RegionInfo.RegionName));
Assert.That(afterSceneBSp.AbsolutePosition, Is.EqualTo(teleportPosition));
Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(0));
Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(1));
Assert.That(sceneB.GetRootAgentCount(), Is.EqualTo(1));
Assert.That(sceneB.GetChildAgentCount(), Is.EqualTo(0));
// TODO: Add assertions to check correct circuit details in both scenes.
// Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera