diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 15 |
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 | ||