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,8 +264,32 @@ namespace OpenSim.Groups
int requestStartTick = Environment.TickCount; int requestStartTick = Environment.TickCount;
// Copy Message
GridInstantMessage msg = new GridInstantMessage();
msg.imSessionID = groupID.Guid;
msg.fromAgentName = im.fromAgentName;
msg.message = im.message;
msg.dialog = im.dialog;
msg.offline = im.offline;
msg.ParentEstateID = im.ParentEstateID;
msg.Position = im.Position;
msg.RegionID = im.RegionID;
msg.binaryBucket = im.binaryBucket;
msg.timestamp = (uint)Util.UnixTimeSinceEpoch();
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) foreach (GroupMembersData member in groupMembers)
{ {
if (member.AgentID.Guid == im.fromAgentID)
continue;
if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID.ToString(), groupID)) if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID.ToString(), groupID))
{ {
// Don't deliver messages to people who have dropped this session // Don't deliver messages to people who have dropped this session
@ -273,22 +297,6 @@ namespace OpenSim.Groups
continue; continue;
} }
// Copy Message
GridInstantMessage msg = new GridInstantMessage();
msg.imSessionID = groupID.Guid;
msg.fromAgentName = im.fromAgentName;
msg.message = im.message;
msg.dialog = im.dialog;
msg.offline = im.offline;
msg.ParentEstateID = im.ParentEstateID;
msg.Position = im.Position;
msg.RegionID = im.RegionID;
msg.binaryBucket = im.binaryBucket;
msg.timestamp = (uint)Util.UnixTimeSinceEpoch();
msg.fromAgentID = im.fromAgentID;
msg.fromGroup = true;
msg.toAgentID = member.AgentID.Guid; msg.toAgentID = member.AgentID.Guid;
IClientAPI client = GetActiveClient(member.AgentID); IClientAPI client = GetActiveClient(member.AgentID);