From e7ac639f3a8a05858df03a8b5fd611826a56ae97 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 5 Jan 2009 19:36:48 +0000 Subject: * Centralize references to the well known blank texture 5748decc-f629-461c-9a36-a35a221fe21f to a constant in OpenSim.Framework.Util --- OpenSim/Framework/AvatarAppearance.cs | 6 ++---- OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | 5 ++--- OpenSim/Framework/Util.cs | 7 ++++++- .../Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs | 3 +-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 224e9a3..ad95f78 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs @@ -298,8 +298,8 @@ namespace OpenSim.Framework { Primitive.TextureEntry textu = new Primitive.TextureEntry(new UUID("C228D1CF-4B5D-4BA8-84F4-899A0796AA97")); textu.CreateFace(0).TextureID = new UUID("00000000-0000-1111-9999-000000000012"); - textu.CreateFace(1).TextureID = new UUID("5748decc-f629-461c-9a36-a35a221fe21f"); - textu.CreateFace(2).TextureID = new UUID("5748decc-f629-461c-9a36-a35a221fe21f"); + textu.CreateFace(1).TextureID = Util.BLANK_TEXTURE_UUID; + textu.CreateFace(2).TextureID = Util.BLANK_TEXTURE_UUID; textu.CreateFace(3).TextureID = new UUID("6522E74D-1660-4E7F-B601-6F48C1659A77"); textu.CreateFace(4).TextureID = new UUID("7CA39B4C-BD19-4699-AFF7-F93FD03D3E7B"); textu.CreateFace(5).TextureID = new UUID("00000000-0000-1111-9999-000000000010"); @@ -319,8 +319,6 @@ namespace OpenSim.Framework protected AvatarAppearance(SerializationInfo info, StreamingContext context) { - //System.Console.WriteLine("AvatarAppearance Deserialize BGN"); - if (info == null) { throw new ArgumentNullException("info"); diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index a78e093..6c18d06 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs @@ -95,9 +95,8 @@ namespace OpenSim.Framework.Communications.Tests responseData["circuit_code"], Is.GreaterThanOrEqualTo(0) & Is.LessThanOrEqualTo(System.Int32.MaxValue)); Regex capsSeedPattern - = new Regex("^http://" - + regionExternalName - + ":9000/CAPS/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{8}0000/$"); + = new Regex("^http://" + regionExternalName + ":" + NetworkServersInfo.DefaultHttpListenerPort + + "/CAPS/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{8}0000/$"); Assert.That(capsSeedPattern.IsMatch((string)responseData["seed_capability"]), Is.True); } diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 4cc7134..396996a 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -51,7 +51,7 @@ namespace OpenSim.Framework /// public class Util { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static uint nextXferID = 5000; private static Random randomClass = new Random(); @@ -66,6 +66,11 @@ namespace OpenSim.Framework public static readonly Regex UUIDPattern = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"); + + /// + /// Well known UUID for the blank texture used in the Linden SL viewer version 1.20 (and hopefully onwards) + /// + public static UUID BLANK_TEXTURE_UUID = new UUID("5748decc-f629-461c-9a36-a35a221fe21f"); #region Vector Equations diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs index ff8d0b9..c5efb4f 100644 --- a/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs +++ b/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs @@ -129,7 +129,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap private static readonly Color defaultColor3 = Color.FromArgb(162, 154, 141); private static readonly UUID defaultTerrainTexture4 = new UUID("53a2f406-4895-1d13-d541-d2e3b86bc19c"); private static readonly Color defaultColor4 = Color.FromArgb(200, 200, 200); - private static readonly UUID blankTerrainTexture = new UUID("5748decc-f629-461c-9a36-a35a221fe21f"); #endregion @@ -153,7 +152,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap m_mapping.Add(defaultTerrainTexture2, defaultColor2); m_mapping.Add(defaultTerrainTexture3, defaultColor3); m_mapping.Add(defaultTerrainTexture4, defaultColor4); - m_mapping.Add(blankTerrainTexture, Color.White); + m_mapping.Add(Util.BLANK_TEXTURE_UUID, Color.White); } #region Helpers -- cgit v1.1