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. --- .../External/RegionSettingsSerializer.cs | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'OpenSim/Framework/Serialization') 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