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

@@ -181,60 +181,63 @@ namespace OpenSim.Region.Environment.Modules
{
m_scene.ForEachScenePresence(delegate(ScenePresence presence)
{
int dis = -100000;
LLVector3 avatarRegionPos = presence.AbsolutePosition +
new LLVector3(
scene.RegionInfo.RegionLocX*256,
scene.RegionInfo.RegionLocY*256,
0);
dis =
Math.Abs((int) avatarRegionPos.GetDistanceTo(fromRegionPos));
switch (e.Type)
if (!presence.IsChildAgent)
{
case ChatTypeEnum.Whisper:
if (dis < m_whisperdistance)
{
//should change so the message is sent through the avatar rather than direct to the ClientView
presence.ControllingClient.SendChatMessage(message,
type,
fromPos,
fromName,
fromAgentID);
}
break;
case ChatTypeEnum.Say:
if (dis < m_saydistance)
{
//Console.WriteLine("sending chat");
presence.ControllingClient.SendChatMessage(message,
type,
fromPos,
fromName,
fromAgentID);
}
break;
case ChatTypeEnum.Shout:
if (dis < m_shoutdistance)
{
presence.ControllingClient.SendChatMessage(message,
type,
fromPos,
fromName,
fromAgentID);
}
break;
int dis = -100000;
case ChatTypeEnum.Broadcast:
presence.ControllingClient.SendChatMessage(message,
type,
fromPos,
fromName,
fromAgentID);
break;
default:
break;
LLVector3 avatarRegionPos = presence.AbsolutePosition +
new LLVector3(
scene.RegionInfo.RegionLocX * 256,
scene.RegionInfo.RegionLocY * 256,
0);
dis =
Math.Abs((int)avatarRegionPos.GetDistanceTo(fromRegionPos));
switch (e.Type)
{
case ChatTypeEnum.Whisper:
if (dis < m_whisperdistance)
{
//should change so the message is sent through the avatar rather than direct to the ClientView
presence.ControllingClient.SendChatMessage(message,
type,
fromPos,
fromName,
fromAgentID);
}
break;
case ChatTypeEnum.Say:
if (dis < m_saydistance)
{
//Console.WriteLine("sending chat");
presence.ControllingClient.SendChatMessage(message,
type,
fromPos,
fromName,
fromAgentID);
}
break;
case ChatTypeEnum.Shout:
if (dis < m_shoutdistance)
{
presence.ControllingClient.SendChatMessage(message,
type,
fromPos,
fromName,
fromAgentID);
}
break;
case ChatTypeEnum.Broadcast:
presence.ControllingClient.SendChatMessage(message,
type,
fromPos,
fromName,
fromAgentID);
break;
default:
break;
}
}
});
}