Trying to decrease the lag on group chat. (Groups V2 only)

TeleportWork
Diva Canto 2013-07-26 21:27:00 -07:00
parent 428916a64d
commit 85428c49bb
1 changed files with 24 additions and 16 deletions

View File

@ -264,15 +264,6 @@ namespace OpenSim.Groups
int requestStartTick = Environment.TickCount;
foreach (GroupMembersData member in groupMembers)
{
if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID.ToString(), groupID))
{
// Don't deliver messages to people who have dropped this session
if (m_debugEnabled) m_log.DebugFormat("[Groups.Messaging]: {0} has dropped session, not delivering to them", member.AgentID);
continue;
}
// Copy Message
GridInstantMessage msg = new GridInstantMessage();
msg.imSessionID = groupID.Guid;
@ -289,6 +280,23 @@ namespace OpenSim.Groups
msg.fromAgentID = im.fromAgentID;
msg.fromGroup = true;
// Send to self first of all
msg.toAgentID = msg.fromAgentID;
ProcessMessageFromGroupSession(msg);
// Then send to everybody else
foreach (GroupMembersData member in groupMembers)
{
if (member.AgentID.Guid == im.fromAgentID)
continue;
if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID.ToString(), groupID))
{
// Don't deliver messages to people who have dropped this session
if (m_debugEnabled) m_log.DebugFormat("[Groups.Messaging]: {0} has dropped session, not delivering to them", member.AgentID);
continue;
}
msg.toAgentID = member.AgentID.Guid;
IClientAPI client = GetActiveClient(member.AgentID);