aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Serialization/External
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-02-12 23:13:35 +0000
committerJustin Clark-Casey (justincc)2010-02-12 23:13:35 +0000
commit00800c59d35662d65aeb61a17de0d56fa6196509 (patch)
tree594c2eefcf1806392d6c00cb86cf3b764f1d9f1c /OpenSim/Framework/Serialization/External
parentminor: remove completely commented out and unused class (diff)
downloadopensim-SC_OLD-00800c59d35662d65aeb61a17de0d56fa6196509.zip
opensim-SC_OLD-00800c59d35662d65aeb61a17de0d56fa6196509.tar.gz
opensim-SC_OLD-00800c59d35662d65aeb61a17de0d56fa6196509.tar.bz2
opensim-SC_OLD-00800c59d35662d65aeb61a17de0d56fa6196509.tar.xz
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.
Diffstat (limited to 'OpenSim/Framework/Serialization/External')
-rw-r--r--OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs24
1 files changed, 12 insertions, 12 deletions
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
109 settings.AgentLimit = int.Parse(xtr.ReadElementContentAsString()); 109 settings.AgentLimit = int.Parse(xtr.ReadElementContentAsString());
110 break; 110 break;
111 case "ObjectBonus": 111 case "ObjectBonus":
112 settings.ObjectBonus = double.Parse(xtr.ReadElementContentAsString()); 112 settings.ObjectBonus = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
113 break; 113 break;
114 } 114 }
115 } 115 }
@@ -134,28 +134,28 @@ namespace OpenSim.Framework.Serialization.External
134 settings.TerrainTexture4 = UUID.Parse(xtr.ReadElementContentAsString()); 134 settings.TerrainTexture4 = UUID.Parse(xtr.ReadElementContentAsString());
135 break; 135 break;
136 case "ElevationLowSW": 136 case "ElevationLowSW":
137 settings.Elevation1SW = double.Parse(xtr.ReadElementContentAsString()); 137 settings.Elevation1SW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
138 break; 138 break;
139 case "ElevationLowNW": 139 case "ElevationLowNW":
140 settings.Elevation1NW = double.Parse(xtr.ReadElementContentAsString()); 140 settings.Elevation1NW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
141 break; 141 break;
142 case "ElevationLowSE": 142 case "ElevationLowSE":
143 settings.Elevation1SE = double.Parse(xtr.ReadElementContentAsString()); 143 settings.Elevation1SE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
144 break; 144 break;
145 case "ElevationLowNE": 145 case "ElevationLowNE":
146 settings.Elevation1NE = double.Parse(xtr.ReadElementContentAsString()); 146 settings.Elevation1NE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
147 break; 147 break;
148 case "ElevationHighSW": 148 case "ElevationHighSW":
149 settings.Elevation2SW = double.Parse(xtr.ReadElementContentAsString()); 149 settings.Elevation2SW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
150 break; 150 break;
151 case "ElevationHighNW": 151 case "ElevationHighNW":
152 settings.Elevation2NW = double.Parse(xtr.ReadElementContentAsString()); 152 settings.Elevation2NW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
153 break; 153 break;
154 case "ElevationHighSE": 154 case "ElevationHighSE":
155 settings.Elevation2SE = double.Parse(xtr.ReadElementContentAsString()); 155 settings.Elevation2SE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
156 break; 156 break;
157 case "ElevationHighNE": 157 case "ElevationHighNE":
158 settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString()); 158 settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
159 break; 159 break;
160 } 160 }
161 } 161 }
@@ -168,13 +168,13 @@ namespace OpenSim.Framework.Serialization.External
168 switch (xtr.Name) 168 switch (xtr.Name)
169 { 169 {
170 case "WaterHeight": 170 case "WaterHeight":
171 settings.WaterHeight = double.Parse(xtr.ReadElementContentAsString()); 171 settings.WaterHeight = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
172 break; 172 break;
173 case "TerrainRaiseLimit": 173 case "TerrainRaiseLimit":
174 settings.TerrainRaiseLimit = double.Parse(xtr.ReadElementContentAsString()); 174 settings.TerrainRaiseLimit = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
175 break; 175 break;
176 case "TerrainLowerLimit": 176 case "TerrainLowerLimit":
177 settings.TerrainLowerLimit = double.Parse(xtr.ReadElementContentAsString()); 177 settings.TerrainLowerLimit = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
178 break; 178 break;
179 case "UseEstateSun": 179 case "UseEstateSun":
180 settings.UseEstateSun = bool.Parse(xtr.ReadElementContentAsString()); 180 settings.UseEstateSun = bool.Parse(xtr.ReadElementContentAsString());