mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user