aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-03-25 18:47:14 +0000
committerJustin Clarke Casey2008-03-25 18:47:14 +0000
commit8c74cf775895276e485f82b04c23099db09dc682 (patch)
tree7f11eafe072b32a0f9b949844e9150c8167d9bb6 /OpenSim/Region/Environment/Scenes/ScenePresence.cs
parent* Use Face normal to offset new prim instead of the hard coded pos.Z += 0.25f... (diff)
downloadopensim-SC_OLD-8c74cf775895276e485f82b04c23099db09dc682.zip
opensim-SC_OLD-8c74cf775895276e485f82b04c23099db09dc682.tar.gz
opensim-SC_OLD-8c74cf775895276e485f82b04c23099db09dc682.tar.bz2
opensim-SC_OLD-8c74cf775895276e485f82b04c23099db09dc682.tar.xz
* Tear down CAPS and http handlers when an agent leaves a region (via crossing, teleport or logout)
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs15
1 files changed, 12 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index df43490..8f9cbbf 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -1618,12 +1618,17 @@ namespace OpenSim.Region.Environment.Scenes
1618 ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); 1618 ulong neighbourHandle = Helpers.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
1619 SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle); 1619 SimpleRegionInfo neighbourRegion = m_scene.RequestNeighbouringRegionInfo(neighbourHandle);
1620 if (neighbourRegion != null) 1620 if (neighbourRegion != null)
1621 { 1621 {
1622 // When the neighbour is informed of the border crossing, it will set up CAPS handlers for the avatar
1623 // This means we need to remove the current caps handler here and possibly compensate later,
1624 // in case both scenes are being hosted on the same region server. Messy
1625 m_scene.RemoveCapsHandler(UUID);
1626
1622 bool res = 1627 bool res =
1623 m_scene.InformNeighbourOfCrossing(neighbourHandle, m_controllingClient.AgentId, newpos, 1628 m_scene.InformNeighbourOfCrossing(neighbourHandle, m_controllingClient.AgentId, newpos,
1624 m_physicsActor.Flying); 1629 m_physicsActor.Flying);
1625 if (res) 1630 if (res)
1626 { 1631 {
1627 AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo(); 1632 AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo();
1628 1633
1629 // TODO Should construct this behind a method 1634 // TODO Should construct this behind a method
@@ -1632,7 +1637,7 @@ namespace OpenSim.Region.Environment.Scenes
1632 + "/CAPS/" + circuitdata.CapsPath + "0000/"; 1637 + "/CAPS/" + circuitdata.CapsPath + "0000/";
1633 1638
1634 m_log.DebugFormat( 1639 m_log.DebugFormat(
1635 "[CONNECTION DEBUGGING]: Sending new CAPS seed url {0} to avatar {1}", capsPath, m_uuid); 1640 "[CONNECTION DEBUGGING]: Sending new CAPS seed url {0} to avatar {1}", capsPath, m_uuid);
1636 1641
1637 m_controllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint, 1642 m_controllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint,
1638 capsPath); 1643 capsPath);
@@ -1640,6 +1645,10 @@ namespace OpenSim.Region.Environment.Scenes
1640 m_scene.SendKillObject(m_localId); 1645 m_scene.SendKillObject(m_localId);
1641 m_scene.NotifyMyCoarseLocationChange(); 1646 m_scene.NotifyMyCoarseLocationChange();
1642 } 1647 }
1648 else
1649 {
1650 m_scene.AddCapsHandler(UUID);
1651 }
1643 } 1652 }
1644 } 1653 }
1645 1654