diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index d1f5378a70..4715326124 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -710,7 +710,6 @@ namespace OpenSim.Framework Vector3 StartPos { get; set; } UUID AgentId { get; } - bool SupportObjectAnimations { get; set; } /// /// The scene agent for this client. This will only be set if the client has an agent in a scene (i.e. if it @@ -1515,5 +1514,6 @@ namespace OpenSim.Framework void SendAgentTerseUpdate(ISceneEntity presence); void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data); + void CheckViewerCaps(); } } diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 34e3a43892..9a022e6341 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -26,15 +26,11 @@ */ using System; -using System.Collections; using System.Collections.Generic; using System.Net; using System.Reflection; using System.Runtime; -using System.Text; using System.Threading; -using System.Timers; -using System.Xml; using log4net; using OpenMetaverse; @@ -48,11 +44,10 @@ using OpenSim.Framework.Monitoring; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; -using Timer = System.Timers.Timer; +using Caps = OpenSim.Framework.Capabilities.Caps; + using AssetLandmark = OpenSim.Framework.AssetLandmark; using RegionFlags = OpenMetaverse.RegionFlags; - -using System.IO; using PermissionMask = OpenSim.Framework.PermissionMask; namespace OpenSim.Region.ClientStack.LindenUDP @@ -351,7 +346,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #pragma warning restore 0414 private const uint MaxTransferBytesPerPacket = 600; - public bool SupportObjectAnimations { get; set; } + private bool m_SupportObjectAnimations; /// /// Maintain a record of all the objects killed. This allows us to stop an update being sent from the @@ -3917,7 +3912,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendObjectAnimations(UUID[] animations, int[] seqs, UUID senderId) { // m_log.DebugFormat("[LLCLIENTVIEW]: Sending Object animations for {0} to {1}", sourceAgentId, Name); - if(!SupportObjectAnimations) + if(!m_SupportObjectAnimations) return; ObjectAnimationPacket ani = (ObjectAnimationPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAnimation); @@ -4330,7 +4325,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (update.Entity is SceneObjectPart) { - if (SupportObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations)) + if (m_SupportObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations)) { SceneObjectPart sop = (SceneObjectPart)update.Entity; if ( sop.Animations != null) @@ -13540,5 +13535,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP { return new HashSet(m_inPacketsToDrop); } + + public void CheckViewerCaps() + { + m_SupportObjectAnimations = false; + if (m_scene.CapsModule != null) + { + Caps cap = m_scene.CapsModule.GetCapsForUser(CircuitCode); + if (cap != null && (cap.Flags & Caps.CapsFlags.ObjectAnim) != 0) + m_SupportObjectAnimations = true; + } + } } } diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 667acf970c..5f3578232b 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -46,6 +46,7 @@ using OpenMetaverse; using Mono.Addins; using TokenBucket = OpenSim.Region.ClientStack.LindenUDP.TokenBucket; + namespace OpenSim.Region.ClientStack.LindenUDP { /// @@ -1697,8 +1698,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_pendingCache.Remove(endPoint); } - m_log.DebugFormat("[LLUDPSERVER]: Client created, processing pending queue, {0} entries", queue.Count); + client.CheckViewerCaps(); + m_log.DebugFormat("[LLUDPSERVER]: Client created, processing pending queue, {0} entries", queue.Count); // Reinject queued packets while (queue.Count > 0) { diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 527f12ea2c..3b78f2ddb4 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -45,7 +45,6 @@ using OpenSim.Region.PhysicsModules.SharedBase; using GridRegion = OpenSim.Services.Interfaces.GridRegion; using OpenSim.Services.Interfaces; using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags; -using Caps = OpenSim.Framework.Capabilities.Caps; namespace OpenSim.Region.Framework.Scenes { @@ -1111,14 +1110,6 @@ namespace OpenSim.Region.Framework.Scenes HealRate = 0.5f; - ControllingClient.SupportObjectAnimations = false; - if (m_scene.CapsModule != null) - { - Caps cap = m_scene.CapsModule.GetCapsForUser(ControllingClient.CircuitCode); - if (cap != null && (cap.Flags & Caps.CapsFlags.ObjectAnim) != 0) - ControllingClient.SupportObjectAnimations = true; - } - IConfig sconfig = m_scene.Config.Configs["EntityTransfer"]; if (sconfig != null) { @@ -1142,7 +1133,6 @@ namespace OpenSim.Region.Framework.Scenes } m_bandwidthBurst = m_bandwidth / 5; ControllingClient.RefreshGroupMembership(); - } private float lastHealthSent = 0; diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index febf995c16..c7b781839e 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -60,8 +60,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public int PingTimeMS { get { return 0; } } - public bool SupportObjectAnimations { get; set; } - private string m_username; private string m_nick; @@ -1782,5 +1780,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { return 0; } + + public void CheckViewerCaps() { } + } } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 0984c60dd8..0758fc9735 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -73,7 +73,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC private UUID m_profileImage = UUID.Zero; private string m_born; public List SelectedObjects {get; private set;} - public bool SupportObjectAnimations { get; set; } public NPCAvatar( string firstname, string lastname, Vector3 position, UUID ownerID, bool senseAsAgent, Scene scene) @@ -1392,5 +1391,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC return 0; } + public void CheckViewerCaps() { } + } } diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index b0ede78ad1..ecf3785b31 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -1404,5 +1404,8 @@ namespace OpenSim.Tests.Common public void SendPartPhysicsProprieties(ISceneEntity entity) { } + + public void CheckViewerCaps() { } + } } diff --git a/prebuild.xml b/prebuild.xml index d5e61eec41..0f2b6c9f6d 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1395,6 +1395,7 @@ +