From 73fbacea1fe18873fab175d82189a1becb0f8e10 Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 5 Nov 2007 13:58:44 +0000 Subject: Started to cleanup/close down childagent connections when a user teleports. As the client will not close old childagent connections without being told explicitly to do so by each region the connection is to. Currently only implemented in standalone mode. ( the TellRegionToCloseChildConnection( ) in OGS1GridServices.cs needs implementing for grid mode, and the inter region .net remoting added for the new messages). hopefully fixed the echo bug in chatmodule. --- OpenSim/Region/Environment/Scenes/Scene.cs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 8262478..d436bb3 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -816,6 +816,7 @@ namespace OpenSim.Region.Environment.Scenes m_sceneGridService.RegisterRegion(m_regInfo); m_sceneGridService.OnExpectUser += NewUserConnection; m_sceneGridService.OnAvatarCrossingIntoRegion += AgentCrossing; + m_sceneGridService.OnCloseAgentConnection += CloseConnection; } /// @@ -864,13 +865,26 @@ namespace OpenSim.Region.Environment.Scenes } } + public void CloseConnection(ulong regionHandle, LLUUID agentID) + { + if (regionHandle == m_regionHandle) + { + ScenePresence presence = m_innerScene.GetScenePresence(agentID); + if(presence != null) + { + libsecondlife.Packets.DisableSimulatorPacket disable = new libsecondlife.Packets.DisableSimulatorPacket(); + presence.ControllingClient.OutPacket(disable); + } + } + } + /// /// /// public void InformClientOfNeighbours(ScenePresence presence) { - m_sceneGridService.InformClientOfNeighbours(presence); + m_sceneGridService.EnableNeighbourChildAgents(presence); } /// @@ -908,7 +922,7 @@ namespace OpenSim.Region.Environment.Scenes { if (m_scenePresences.ContainsKey(remoteClient.AgentId)) { - m_sceneGridService.RequestTeleportLocation(m_scenePresences[remoteClient.AgentId], regionHandle, position, lookAt, flags); + m_sceneGridService.RequestTeleportToLocation(m_scenePresences[remoteClient.AgentId], regionHandle, position, lookAt, flags); } } @@ -920,7 +934,7 @@ namespace OpenSim.Region.Environment.Scenes /// public bool InformNeighbourOfCrossing(ulong regionhandle, LLUUID agentID, LLVector3 position, bool isFlying) { - return m_sceneGridService.InformNeighbourOfCrossing(regionhandle, agentID, position, isFlying); + return m_sceneGridService.CrossToNeighbouringRegion(regionhandle, agentID, position, isFlying); } #endregion -- cgit v1.1