From b6ac1c46cd473b129b70344f0001f1e8f97d8860 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 2 Aug 2011 00:13:04 +0100 Subject: Get rid of AvatarAppearance.Owner to simplify the code. This is not used for anything - appearances are always properties of objects with ids (ScenePresence, AgentCircuitData) and just has the potential to get out of sync when the appearance is cloned. --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 ++-- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ++-- .../OptionalModules/Framework/Monitoring/MonitorServicesModule.cs | 2 +- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index b84c3d5..b3b6cbc 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3079,7 +3079,7 @@ namespace OpenSim.Region.Framework.Scenes if (aCircuit == null) { m_log.DebugFormat("[APPEARANCE] Client did not supply a circuit. Non-Linden? Creating default appearance."); - appearance = new AvatarAppearance(client.AgentId); + appearance = new AvatarAppearance(); return; } @@ -3087,7 +3087,7 @@ namespace OpenSim.Region.Framework.Scenes if (appearance == null) { m_log.DebugFormat("[APPEARANCE]: Appearance not found in {0}, returning default", RegionInfo.RegionName); - appearance = new AvatarAppearance(client.AgentId); + appearance = new AvatarAppearance(); } } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 1e121d9..4739f5b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -916,7 +916,7 @@ namespace OpenSim.Region.Framework.Scenes { m_log.ErrorFormat("[SCENE PRESENCE]: null appearance in MakeRoot in {0}", Scene.RegionInfo.RegionName); // emergency; this really shouldn't happen - m_appearance = new AvatarAppearance(UUID); + m_appearance = new AvatarAppearance(); } AddToPhysicalScene(isFlying); @@ -2651,7 +2651,7 @@ namespace OpenSim.Region.Framework.Scenes // "[SCENE PRESENCE] Send appearance from {0} {1} to {2} {3}", Name, m_uuid, avatar.Name, avatar.UUID); avatar.ControllingClient.SendAppearance( - m_appearance.Owner, m_appearance.VisualParams, m_appearance.Texture.GetBytes()); + UUID, m_appearance.VisualParams, m_appearance.Texture.GetBytes()); } // Because appearance setting is in a module, we actually need diff --git a/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs b/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs index d49face..a25e034 100644 --- a/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs +++ b/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs @@ -47,7 +47,7 @@ namespace OpenSim.Region.OptionalModules.Framework.Monitoring { protected Scene m_scene; - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public string Name { get { return "Services Health Monitoring Module"; } } diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 64f82c9..6286dc8 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -93,7 +93,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC AvatarAppearance originalAppearance = GetAppearance(cloneAppearanceFrom, scene); AvatarAppearance npcAppearance = new AvatarAppearance(originalAppearance, true); - npcAppearance.Owner = acd.AgentID; acd.Appearance = npcAppearance; // for (int i = 0; i < acd.Appearance.Texture.FaceTextures.Length; i++) -- cgit v1.1