From f5812b3702f38d4535f042303eef4bd37f8a448c Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 28 Mar 2009 01:40:33 +0000 Subject: * Adds AgentUUIDs into the CourseLocationUpdate to improve compatibility with LibOMV based clients. * Modifies the IClientAPI! So client stacks will need to be modified! --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 47585f9..07f72c3 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2674,7 +2674,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(terse, ThrottleOutPacketType.Task); } - public void SendCoarseLocationUpdate(List CoarseLocations) + public void SendCoarseLocationUpdate(List users, List 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; -- cgit v1.1