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.
This commit is contained in:
MW
2007-11-05 13:58:44 +00:00
parent fdb57b28b1
commit 73fbacea1f
8 changed files with 129 additions and 67 deletions

View File

@@ -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;
}
/// <summary>
@@ -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);
}
}
}
/// <summary>
///
/// </summary>
public void InformClientOfNeighbours(ScenePresence presence)
{
m_sceneGridService.InformClientOfNeighbours(presence);
m_sceneGridService.EnableNeighbourChildAgents(presence);
}
/// <summary>
@@ -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
/// <param name="position"></param>
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