From 802a969267da9ed2780ea66c736c3d531e336dfa Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 12 Feb 2010 21:32:03 +0000 Subject: Fix http://opensimulator.org/mantis/view.php?id=4224 This resolves the problem where eyes and hair would turn white on standalone configurations When a client receives body part information, for some insane reason or other it always ends up uploading this back to the server and then immediately re-requesting it. This should have been okay since we stored that asset in cache. However, the standalone asset service connector was not checking this cache properly, so every time the client made the request for the asset it has just loaded it would get a big fat null back in the face, causing it to make clothes and hair white. This bug did not affect grids since they use a different service connector. --- OpenSim/Framework/AvatarAppearance.cs | 16 ++++------------ OpenSim/Framework/Communications/UserManagerBase.cs | 3 ++- 2 files changed, 6 insertions(+), 13 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 56fcc15..a3ea499 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs @@ -69,9 +69,7 @@ namespace OpenSim.Framework private static UUID HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66"); private static UUID HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66"); - public readonly static int VISUALPARAM_COUNT = 218; - - + public readonly static int VISUALPARAM_COUNT = 218; protected UUID m_owner; @@ -346,11 +344,7 @@ namespace OpenSim.Framework } */ - - public AvatarAppearance() - : this(UUID.Zero) - { - } + public AvatarAppearance() : this(UUID.Zero) {} public AvatarAppearance(UUID owner) { @@ -367,10 +361,8 @@ namespace OpenSim.Framework // This sets Visual Params with *less* weirder values then default. Instead of a ugly alien, it looks like a fat scientist SetDefaultParams(m_visualparams); SetDefaultWearables(); - m_texture = GetDefaultTexture(); - + m_texture = GetDefaultTexture(); } - public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, byte[] visualParams) { @@ -1481,4 +1473,4 @@ namespace OpenSim.Framework SKIRT_SKIRT_BLUE = 217 } } -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 4f0af06..02be141 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -785,7 +785,8 @@ namespace OpenSim.Framework.Communications } catch (Exception e) { - m_log.ErrorFormat("[USERSTORAGE]: Unable to find user appearance {0} via {1} ({2})", user.ToString(), plugin.Name, e.ToString()); + m_log.ErrorFormat( + "[USERSTORAGE]: Unable to find user appearance {0} via {1} ({2})", user, plugin.Name, e); } } -- cgit v1.1 From 00800c59d35662d65aeb61a17de0d56fa6196509 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 12 Feb 2010 23:13:35 +0000 Subject: Apply last two patches from http://opensimulator.org/mantis/view.php?id=3522 These patch should allow people using systems that do not have their locale set to En_US or similar to use OpenSim without suffering effects such as being a million miles up in the air on login. The problem was caused by parsing strings without forcing that parse to be En_US (hence different decimal and digit group symbols were causing problems). Thanks very much to VikingErik for doing the legwork on this fix and phacelia for spotting it in the first place. --- .../Communications/Services/LoginService.cs | 4 ++-- OpenSim/Framework/Culture.cs | 2 +- .../External/RegionSettingsSerializer.cs | 24 +++++++++++----------- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs index 57ca704..71b38ed 100644 --- a/OpenSim/Framework/Communications/Services/LoginService.cs +++ b/OpenSim/Framework/Communications/Services/LoginService.cs @@ -1015,8 +1015,8 @@ namespace OpenSim.Framework.Communications.Services } else { - theUser.CurrentAgent.Position = new Vector3(float.Parse(uriMatch.Groups["x"].Value), - float.Parse(uriMatch.Groups["y"].Value), float.Parse(uriMatch.Groups["z"].Value)); + theUser.CurrentAgent.Position = new Vector3(float.Parse(uriMatch.Groups["x"].Value, Culture.NumberFormatInfo), + float.Parse(uriMatch.Groups["y"].Value, Culture.NumberFormatInfo), float.Parse(uriMatch.Groups["z"].Value, Culture.NumberFormatInfo)); } } response.LookAt = "[r0,r1,r0]"; diff --git a/OpenSim/Framework/Culture.cs b/OpenSim/Framework/Culture.cs index 2066794..3d78fac 100644 --- a/OpenSim/Framework/Culture.cs +++ b/OpenSim/Framework/Culture.cs @@ -33,7 +33,7 @@ namespace OpenSim.Framework { public class Culture { - private static readonly CultureInfo m_cultureInfo = new CultureInfo("en-US", true); + private static readonly CultureInfo m_cultureInfo = new CultureInfo("en-US", false); public static NumberFormatInfo NumberFormatInfo { diff --git a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs index b5901e1..6ba4c5a 100644 --- a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs +++ b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs @@ -109,7 +109,7 @@ namespace OpenSim.Framework.Serialization.External settings.AgentLimit = int.Parse(xtr.ReadElementContentAsString()); break; case "ObjectBonus": - settings.ObjectBonus = double.Parse(xtr.ReadElementContentAsString()); + settings.ObjectBonus = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); break; } } @@ -134,28 +134,28 @@ namespace OpenSim.Framework.Serialization.External settings.TerrainTexture4 = UUID.Parse(xtr.ReadElementContentAsString()); break; case "ElevationLowSW": - settings.Elevation1SW = double.Parse(xtr.ReadElementContentAsString()); + settings.Elevation1SW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); break; case "ElevationLowNW": - settings.Elevation1NW = double.Parse(xtr.ReadElementContentAsString()); + settings.Elevation1NW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); break; case "ElevationLowSE": - settings.Elevation1SE = double.Parse(xtr.ReadElementContentAsString()); + settings.Elevation1SE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); break; case "ElevationLowNE": - settings.Elevation1NE = double.Parse(xtr.ReadElementContentAsString()); + settings.Elevation1NE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); break; case "ElevationHighSW": - settings.Elevation2SW = double.Parse(xtr.ReadElementContentAsString()); + settings.Elevation2SW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); break; case "ElevationHighNW": - settings.Elevation2NW = double.Parse(xtr.ReadElementContentAsString()); + settings.Elevation2NW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); break; case "ElevationHighSE": - settings.Elevation2SE = double.Parse(xtr.ReadElementContentAsString()); + settings.Elevation2SE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); break; case "ElevationHighNE": - settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString()); + settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); break; } } @@ -168,13 +168,13 @@ namespace OpenSim.Framework.Serialization.External switch (xtr.Name) { case "WaterHeight": - settings.WaterHeight = double.Parse(xtr.ReadElementContentAsString()); + settings.WaterHeight = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); break; case "TerrainRaiseLimit": - settings.TerrainRaiseLimit = double.Parse(xtr.ReadElementContentAsString()); + settings.TerrainRaiseLimit = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); break; case "TerrainLowerLimit": - settings.TerrainLowerLimit = double.Parse(xtr.ReadElementContentAsString()); + settings.TerrainLowerLimit = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo); break; case "UseEstateSun": settings.UseEstateSun = bool.Parse(xtr.ReadElementContentAsString()); -- cgit v1.1