* Request from lkalif to have the Sim send a coarselocationupdate for each avatar in the sim, including yourself.

* Apparently the LLClientView should have been doing this previously..      Also fixed the 'You' on the index block..   so the client doesn't display an extra green dot.
* Thanks lkalif for bringing it to our attention.
prioritization
Teravus Ovares (Dan Olivares) 2009-10-15 02:01:29 -04:00
parent b1c93cd3b1
commit 6d3d985511
2 changed files with 9 additions and 5 deletions

View File

@ -3289,11 +3289,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
new CoarseLocationUpdatePacket.IndexBlock();
loc.Location = new CoarseLocationUpdatePacket.LocationBlock[total];
loc.AgentData = new CoarseLocationUpdatePacket.AgentDataBlock[total];
int selfindex = -1;
for (int i = 0; i < total; i++)
{
CoarseLocationUpdatePacket.LocationBlock lb =
new CoarseLocationUpdatePacket.LocationBlock();
lb.X = (byte)CoarseLocations[i].X;
lb.Y = (byte)CoarseLocations[i].Y;
@ -3301,8 +3302,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
loc.Location[i] = lb;
loc.AgentData[i] = new CoarseLocationUpdatePacket.AgentDataBlock();
loc.AgentData[i].AgentID = users[i];
if (users[i] == AgentId)
selfindex = i;
}
ib.You = -1;
ib.You = (short)selfindex;
ib.Prey = -1;
loc.Index = ib;
loc.Header.Reliable = false;

View File

@ -2507,8 +2507,9 @@ namespace OpenSim.Region.Framework.Scenes
List<ScenePresence> avatars = m_scene.GetAvatars();
for (int i = 0; i < avatars.Count; i++)
{
if (avatars[i] != this)
{
// Requested by LibOMV. Send Course Location on self.
//if (avatars[i] != this)
//{
if (avatars[i].ParentID != 0)
{
// sitting avatar
@ -2530,7 +2531,7 @@ namespace OpenSim.Region.Framework.Scenes
CoarseLocations.Add(avatars[i].m_pos);
AvatarUUIDs.Add(avatars[i].UUID);
}
}
//}
}
m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations);