diff options
author | Teravus Ovares | 2009-03-28 01:40:33 +0000 |
---|---|---|
committer | Teravus Ovares | 2009-03-28 01:40:33 +0000 |
commit | f5812b3702f38d4535f042303eef4bd37f8a448c (patch) | |
tree | 01a5a1565d97ce02e5910b153cbfe71f86fd3926 /OpenSim | |
parent | Small bugs fixed related to ownership and permissions. (diff) | |
download | opensim-SC-f5812b3702f38d4535f042303eef4bd37f8a448c.zip opensim-SC-f5812b3702f38d4535f042303eef4bd37f8a448c.tar.gz opensim-SC-f5812b3702f38d4535f042303eef4bd37f8a448c.tar.bz2 opensim-SC-f5812b3702f38d4535f042303eef4bd37f8a448c.tar.xz |
* Adds AgentUUIDs into the CourseLocationUpdate to improve compatibility with LibOMV based clients.
* Modifies the IClientAPI! So client stacks will need to be modified!
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Client/MXP/ClientStack/MXPClientView.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestClient.cs | 2 |
7 files changed, 17 insertions, 8 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index 0da0743..4f4bd93 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs | |||
@@ -1001,7 +1001,7 @@ namespace OpenSim.Client.MXP.ClientStack | |||
1001 | Session.Send(me); | 1001 | Session.Send(me); |
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | public void SendCoarseLocationUpdate(List<Vector3> CoarseLocations) | 1004 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
1005 | { | 1005 | { |
1006 | // Minimap function, not used. | 1006 | // Minimap function, not used. |
1007 | } | 1007 | } |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index ce4d411..66699b1 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -855,7 +855,7 @@ namespace OpenSim.Framework | |||
855 | void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, | 855 | void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, |
856 | Vector3 velocity, Quaternion rotation); | 856 | Vector3 velocity, Quaternion rotation); |
857 | 857 | ||
858 | void SendCoarseLocationUpdate(List<Vector3> CoarseLocations); | 858 | void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations); |
859 | 859 | ||
860 | void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID); | 860 | void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID); |
861 | void SetChildAgentThrottle(byte[] throttle); | 861 | void SetChildAgentThrottle(byte[] throttle); |
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 | |||
2674 | OutPacket(terse, ThrottleOutPacketType.Task); | 2674 | OutPacket(terse, ThrottleOutPacketType.Task); |
2675 | } | 2675 | } |
2676 | 2676 | ||
2677 | public void SendCoarseLocationUpdate(List<Vector3> CoarseLocations) | 2677 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
2678 | { | 2678 | { |
2679 | if (!IsActive) return; // We don't need to update inactive clients. | 2679 | if (!IsActive) return; // We don't need to update inactive clients. |
2680 | 2680 | ||
@@ -2684,14 +2684,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2684 | CoarseLocationUpdatePacket.IndexBlock ib = | 2684 | CoarseLocationUpdatePacket.IndexBlock ib = |
2685 | new CoarseLocationUpdatePacket.IndexBlock(); | 2685 | new CoarseLocationUpdatePacket.IndexBlock(); |
2686 | loc.Location = new CoarseLocationUpdatePacket.LocationBlock[total]; | 2686 | loc.Location = new CoarseLocationUpdatePacket.LocationBlock[total]; |
2687 | loc.AgentData = new CoarseLocationUpdatePacket.AgentDataBlock[total]; | ||
2688 | |||
2687 | for (int i = 0; i < total; i++) | 2689 | for (int i = 0; i < total; i++) |
2688 | { | 2690 | { |
2689 | CoarseLocationUpdatePacket.LocationBlock lb = | 2691 | CoarseLocationUpdatePacket.LocationBlock lb = |
2690 | new CoarseLocationUpdatePacket.LocationBlock(); | 2692 | new CoarseLocationUpdatePacket.LocationBlock(); |
2691 | lb.X = (byte)CoarseLocations[i].X; | 2693 | lb.X = (byte)CoarseLocations[i].X; |
2692 | lb.Y = (byte)CoarseLocations[i].Y; | 2694 | lb.Y = (byte)CoarseLocations[i].Y; |
2693 | lb.Z = (byte)(CoarseLocations[i].Z / 4); | 2695 | |
2696 | lb.Z = CoarseLocations[i].Z > 1024 ? (byte)0 : (byte)(CoarseLocations[i].Z * 0.25); | ||
2694 | loc.Location[i] = lb; | 2697 | loc.Location[i] = lb; |
2698 | loc.AgentData[i] = new CoarseLocationUpdatePacket.AgentDataBlock(); | ||
2699 | loc.AgentData[i].AgentID = users[i]; | ||
2695 | } | 2700 | } |
2696 | ib.You = -1; | 2701 | ib.You = -1; |
2697 | ib.Prey = -1; | 2702 | ib.Prey = -1; |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 599236e..c5b6a1e 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -499,7 +499,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
499 | { | 499 | { |
500 | } | 500 | } |
501 | 501 | ||
502 | public virtual void SendCoarseLocationUpdate(List<Vector3> CoarseLocations) | 502 | public virtual void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
503 | { | 503 | { |
504 | } | 504 | } |
505 | 505 | ||
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 42820c4..b059624 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2178,6 +2178,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2178 | m_perfMonMS = System.Environment.TickCount; | 2178 | m_perfMonMS = System.Environment.TickCount; |
2179 | 2179 | ||
2180 | List<Vector3> CoarseLocations = new List<Vector3>(); | 2180 | List<Vector3> CoarseLocations = new List<Vector3>(); |
2181 | List<UUID> AvatarUUIDs = new List<UUID>(); | ||
2181 | List<ScenePresence> avatars = m_scene.GetAvatars(); | 2182 | List<ScenePresence> avatars = m_scene.GetAvatars(); |
2182 | for (int i = 0; i < avatars.Count; i++) | 2183 | for (int i = 0; i < avatars.Count; i++) |
2183 | { | 2184 | { |
@@ -2190,21 +2191,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
2190 | if (sop != null) | 2191 | if (sop != null) |
2191 | { | 2192 | { |
2192 | CoarseLocations.Add(sop.AbsolutePosition + avatars[i].m_pos); | 2193 | CoarseLocations.Add(sop.AbsolutePosition + avatars[i].m_pos); |
2194 | AvatarUUIDs.Add(avatars[i].UUID); | ||
2193 | } | 2195 | } |
2194 | else | 2196 | else |
2195 | { | 2197 | { |
2196 | // we can't find the parent.. ! arg! | 2198 | // we can't find the parent.. ! arg! |
2197 | CoarseLocations.Add(avatars[i].m_pos); | 2199 | CoarseLocations.Add(avatars[i].m_pos); |
2200 | AvatarUUIDs.Add(avatars[i].UUID); | ||
2198 | } | 2201 | } |
2199 | } | 2202 | } |
2200 | else | 2203 | else |
2201 | { | 2204 | { |
2202 | CoarseLocations.Add(avatars[i].m_pos); | 2205 | CoarseLocations.Add(avatars[i].m_pos); |
2206 | AvatarUUIDs.Add(avatars[i].UUID); | ||
2203 | } | 2207 | } |
2204 | } | 2208 | } |
2205 | } | 2209 | } |
2206 | 2210 | ||
2207 | m_controllingClient.SendCoarseLocationUpdate(CoarseLocations); | 2211 | m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations); |
2208 | 2212 | ||
2209 | m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); | 2213 | m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); |
2210 | } | 2214 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index c182048..e810b4e 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -588,7 +588,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
588 | { | 588 | { |
589 | } | 589 | } |
590 | 590 | ||
591 | public virtual void SendCoarseLocationUpdate(List<Vector3> CoarseLocations) | 591 | public virtual void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
592 | { | 592 | { |
593 | } | 593 | } |
594 | 594 | ||
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index b4b0bea..fac0185 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -586,7 +586,7 @@ namespace OpenSim.Tests.Common.Mock | |||
586 | { | 586 | { |
587 | } | 587 | } |
588 | 588 | ||
589 | public virtual void SendCoarseLocationUpdate(List<Vector3> CoarseLocations) | 589 | public virtual void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
590 | { | 590 | { |
591 | } | 591 | } |
592 | 592 | ||