* Adds AgentUUIDs into the CourseLocationUpdate to improve compatibility with LibOMV based clients.

* Modifies the IClientAPI!  So client stacks will need to be modified!
0.6.5-rc1
Teravus Ovares 2009-03-28 01:40:33 +00:00
parent cd1bf3600d
commit f5812b3702
7 changed files with 17 additions and 8 deletions

View File

@ -1001,7 +1001,7 @@ namespace OpenSim.Client.MXP.ClientStack
Session.Send(me);
}
public void SendCoarseLocationUpdate(List<Vector3> CoarseLocations)
public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
{
// Minimap function, not used.
}

View File

@ -855,7 +855,7 @@ namespace OpenSim.Framework
void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
Vector3 velocity, Quaternion rotation);
void SendCoarseLocationUpdate(List<Vector3> CoarseLocations);
void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations);
void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID);
void SetChildAgentThrottle(byte[] throttle);

View File

@ -2674,7 +2674,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(terse, ThrottleOutPacketType.Task);
}
public void SendCoarseLocationUpdate(List<Vector3> CoarseLocations)
public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
{
if (!IsActive) return; // We don't need to update inactive clients.
@ -2684,14 +2684,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
CoarseLocationUpdatePacket.IndexBlock ib =
new CoarseLocationUpdatePacket.IndexBlock();
loc.Location = new CoarseLocationUpdatePacket.LocationBlock[total];
loc.AgentData = new CoarseLocationUpdatePacket.AgentDataBlock[total];
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;
lb.Z = (byte)(CoarseLocations[i].Z / 4);
lb.Z = CoarseLocations[i].Z > 1024 ? (byte)0 : (byte)(CoarseLocations[i].Z * 0.25);
loc.Location[i] = lb;
loc.AgentData[i] = new CoarseLocationUpdatePacket.AgentDataBlock();
loc.AgentData[i].AgentID = users[i];
}
ib.You = -1;
ib.Prey = -1;

View File

@ -499,7 +499,7 @@ namespace OpenSim.Region.Examples.SimpleModule
{
}
public virtual void SendCoarseLocationUpdate(List<Vector3> CoarseLocations)
public virtual void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
{
}

View File

@ -2178,6 +2178,7 @@ namespace OpenSim.Region.Framework.Scenes
m_perfMonMS = System.Environment.TickCount;
List<Vector3> CoarseLocations = new List<Vector3>();
List<UUID> AvatarUUIDs = new List<UUID>();
List<ScenePresence> avatars = m_scene.GetAvatars();
for (int i = 0; i < avatars.Count; i++)
{
@ -2190,21 +2191,24 @@ namespace OpenSim.Region.Framework.Scenes
if (sop != null)
{
CoarseLocations.Add(sop.AbsolutePosition + avatars[i].m_pos);
AvatarUUIDs.Add(avatars[i].UUID);
}
else
{
// we can't find the parent.. ! arg!
CoarseLocations.Add(avatars[i].m_pos);
AvatarUUIDs.Add(avatars[i].UUID);
}
}
else
{
CoarseLocations.Add(avatars[i].m_pos);
AvatarUUIDs.Add(avatars[i].UUID);
}
}
}
m_controllingClient.SendCoarseLocationUpdate(CoarseLocations);
m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations);
m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
}

View File

@ -588,7 +588,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{
}
public virtual void SendCoarseLocationUpdate(List<Vector3> CoarseLocations)
public virtual void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
{
}

View File

@ -586,7 +586,7 @@ namespace OpenSim.Tests.Common.Mock
{
}
public virtual void SendCoarseLocationUpdate(List<Vector3> CoarseLocations)
public virtual void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
{
}