diff options
author | Justin Clark-Casey (justincc) | 2010-02-12 23:13:35 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-02-12 23:13:35 +0000 |
commit | 00800c59d35662d65aeb61a17de0d56fa6196509 (patch) | |
tree | 594c2eefcf1806392d6c00cb86cf3b764f1d9f1c /OpenSim | |
parent | minor: remove completely commented out and unused class (diff) | |
download | opensim-SC-00800c59d35662d65aeb61a17de0d56fa6196509.zip opensim-SC-00800c59d35662d65aeb61a17de0d56fa6196509.tar.gz opensim-SC-00800c59d35662d65aeb61a17de0d56fa6196509.tar.bz2 opensim-SC-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')
15 files changed, 86 insertions, 85 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs index 9c90a7e..ed18207 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs | |||
@@ -29,6 +29,7 @@ using System; | |||
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Xml.Serialization; | 30 | using System.Xml.Serialization; |
31 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using OpenSim.Framework; | ||
32 | using OpenSim.Framework.Servers; | 33 | using OpenSim.Framework.Servers; |
33 | using OpenSim.Framework.Servers.HttpServer; | 34 | using OpenSim.Framework.Servers.HttpServer; |
34 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
@@ -156,8 +157,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
156 | Vector3 min, max; | 157 | Vector3 min, max; |
157 | try | 158 | try |
158 | { | 159 | { |
159 | min = new Vector3((float)Double.Parse(subregion[0]), (float)Double.Parse(subregion[1]), (float)Double.Parse(subregion[2])); | 160 | min = new Vector3((float)Double.Parse(subregion[0], Culture.NumberFormatInfo), (float)Double.Parse(subregion[1], Culture.NumberFormatInfo), (float)Double.Parse(subregion[2], Culture.NumberFormatInfo)); |
160 | max = new Vector3((float)Double.Parse(subregion[3]), (float)Double.Parse(subregion[4]), (float)Double.Parse(subregion[5])); | 161 | max = new Vector3((float)Double.Parse(subregion[3], Culture.NumberFormatInfo), (float)Double.Parse(subregion[4], Culture.NumberFormatInfo), (float)Double.Parse(subregion[5], Culture.NumberFormatInfo)); |
161 | } | 162 | } |
162 | catch (Exception) | 163 | catch (Exception) |
163 | { | 164 | { |
diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs index 14ce682..7c36a9b 100644 --- a/OpenSim/Client/Linden/LLProxyLoginModule.cs +++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs | |||
@@ -218,9 +218,9 @@ namespace OpenSim.Client.Linden | |||
218 | { | 218 | { |
219 | //m_log.Debug("[CLIENT]: Main agent detected"); | 219 | //m_log.Debug("[CLIENT]: Main agent detected"); |
220 | agentData.startpos = | 220 | agentData.startpos = |
221 | new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"]), | 221 | new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"], Culture.NumberFormatInfo), |
222 | (float)Convert.ToDecimal((string)requestData["startpos_y"]), | 222 | (float)Convert.ToDecimal((string)requestData["startpos_y"], Culture.NumberFormatInfo), |
223 | (float)Convert.ToDecimal((string)requestData["startpos_z"])); | 223 | (float)Convert.ToDecimal((string)requestData["startpos_z"], Culture.NumberFormatInfo)); |
224 | agentData.child = false; | 224 | agentData.child = false; |
225 | } | 225 | } |
226 | 226 | ||
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 | |||
1015 | } | 1015 | } |
1016 | else | 1016 | else |
1017 | { | 1017 | { |
1018 | theUser.CurrentAgent.Position = new Vector3(float.Parse(uriMatch.Groups["x"].Value), | 1018 | theUser.CurrentAgent.Position = new Vector3(float.Parse(uriMatch.Groups["x"].Value, Culture.NumberFormatInfo), |
1019 | float.Parse(uriMatch.Groups["y"].Value), float.Parse(uriMatch.Groups["z"].Value)); | 1019 | float.Parse(uriMatch.Groups["y"].Value, Culture.NumberFormatInfo), float.Parse(uriMatch.Groups["z"].Value, Culture.NumberFormatInfo)); |
1020 | } | 1020 | } |
1021 | } | 1021 | } |
1022 | response.LookAt = "[r0,r1,r0]"; | 1022 | 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 | |||
33 | { | 33 | { |
34 | public class Culture | 34 | public class Culture |
35 | { | 35 | { |
36 | private static readonly CultureInfo m_cultureInfo = new CultureInfo("en-US", true); | 36 | private static readonly CultureInfo m_cultureInfo = new CultureInfo("en-US", false); |
37 | 37 | ||
38 | public static NumberFormatInfo NumberFormatInfo | 38 | public static NumberFormatInfo NumberFormatInfo |
39 | { | 39 | { |
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()); |
diff --git a/OpenSim/Grid/UserServer.Modules/UserManager.cs b/OpenSim/Grid/UserServer.Modules/UserManager.cs index 36c6297..a2032dc 100644 --- a/OpenSim/Grid/UserServer.Modules/UserManager.cs +++ b/OpenSim/Grid/UserServer.Modules/UserManager.cs | |||
@@ -503,7 +503,7 @@ namespace OpenSim.Grid.UserServer.Modules | |||
503 | { | 503 | { |
504 | try | 504 | try |
505 | { | 505 | { |
506 | userProfile.HomeLocationX = (float)Convert.ToDecimal((string)requestData["home_pos_x"]); | 506 | userProfile.HomeLocationX = (float)Convert.ToDecimal((string)requestData["home_pos_x"], Culture.NumberFormatInfo); |
507 | } | 507 | } |
508 | catch (InvalidCastException) | 508 | catch (InvalidCastException) |
509 | { | 509 | { |
@@ -514,7 +514,7 @@ namespace OpenSim.Grid.UserServer.Modules | |||
514 | { | 514 | { |
515 | try | 515 | try |
516 | { | 516 | { |
517 | userProfile.HomeLocationY = (float)Convert.ToDecimal((string)requestData["home_pos_y"]); | 517 | userProfile.HomeLocationY = (float)Convert.ToDecimal((string)requestData["home_pos_y"], Culture.NumberFormatInfo); |
518 | } | 518 | } |
519 | catch (InvalidCastException) | 519 | catch (InvalidCastException) |
520 | { | 520 | { |
@@ -525,7 +525,7 @@ namespace OpenSim.Grid.UserServer.Modules | |||
525 | { | 525 | { |
526 | try | 526 | try |
527 | { | 527 | { |
528 | userProfile.HomeLocationZ = (float)Convert.ToDecimal((string)requestData["home_pos_z"]); | 528 | userProfile.HomeLocationZ = (float)Convert.ToDecimal((string)requestData["home_pos_z"], Culture.NumberFormatInfo); |
529 | } | 529 | } |
530 | catch (InvalidCastException) | 530 | catch (InvalidCastException) |
531 | { | 531 | { |
@@ -536,7 +536,7 @@ namespace OpenSim.Grid.UserServer.Modules | |||
536 | { | 536 | { |
537 | try | 537 | try |
538 | { | 538 | { |
539 | userProfile.HomeLookAtX = (float)Convert.ToDecimal((string)requestData["home_look_x"]); | 539 | userProfile.HomeLookAtX = (float)Convert.ToDecimal((string)requestData["home_look_x"], Culture.NumberFormatInfo); |
540 | } | 540 | } |
541 | catch (InvalidCastException) | 541 | catch (InvalidCastException) |
542 | { | 542 | { |
@@ -547,7 +547,7 @@ namespace OpenSim.Grid.UserServer.Modules | |||
547 | { | 547 | { |
548 | try | 548 | try |
549 | { | 549 | { |
550 | userProfile.HomeLookAtY = (float)Convert.ToDecimal((string)requestData["home_look_y"]); | 550 | userProfile.HomeLookAtY = (float)Convert.ToDecimal((string)requestData["home_look_y"], Culture.NumberFormatInfo); |
551 | } | 551 | } |
552 | catch (InvalidCastException) | 552 | catch (InvalidCastException) |
553 | { | 553 | { |
@@ -558,7 +558,7 @@ namespace OpenSim.Grid.UserServer.Modules | |||
558 | { | 558 | { |
559 | try | 559 | try |
560 | { | 560 | { |
561 | userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]); | 561 | userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"], Culture.NumberFormatInfo); |
562 | } | 562 | } |
563 | catch (InvalidCastException) | 563 | catch (InvalidCastException) |
564 | { | 564 | { |
@@ -634,13 +634,13 @@ namespace OpenSim.Grid.UserServer.Modules | |||
634 | UUID RegionID = new UUID((string)requestData["region_uuid"]); | 634 | UUID RegionID = new UUID((string)requestData["region_uuid"]); |
635 | ulong regionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]); | 635 | ulong regionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]); |
636 | Vector3 position = new Vector3( | 636 | Vector3 position = new Vector3( |
637 | (float)Convert.ToDecimal((string)requestData["region_pos_x"]), | 637 | (float)Convert.ToDecimal((string)requestData["region_pos_x"], Culture.NumberFormatInfo), |
638 | (float)Convert.ToDecimal((string)requestData["region_pos_y"]), | 638 | (float)Convert.ToDecimal((string)requestData["region_pos_y"], Culture.NumberFormatInfo), |
639 | (float)Convert.ToDecimal((string)requestData["region_pos_z"])); | 639 | (float)Convert.ToDecimal((string)requestData["region_pos_z"], Culture.NumberFormatInfo)); |
640 | Vector3 lookat = new Vector3( | 640 | Vector3 lookat = new Vector3( |
641 | (float)Convert.ToDecimal((string)requestData["lookat_x"]), | 641 | (float)Convert.ToDecimal((string)requestData["lookat_x"], Culture.NumberFormatInfo), |
642 | (float)Convert.ToDecimal((string)requestData["lookat_y"]), | 642 | (float)Convert.ToDecimal((string)requestData["lookat_y"], Culture.NumberFormatInfo), |
643 | (float)Convert.ToDecimal((string)requestData["lookat_z"])); | 643 | (float)Convert.ToDecimal((string)requestData["lookat_z"], Culture.NumberFormatInfo)); |
644 | 644 | ||
645 | handlerLogOffUser = OnLogOffUser; | 645 | handlerLogOffUser = OnLogOffUser; |
646 | if (handlerLogOffUser != null) | 646 | if (handlerLogOffUser != null) |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index eccd276..a86a831 100755 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -1183,14 +1183,14 @@ namespace OpenSim | |||
1183 | } | 1183 | } |
1184 | if (cmdparams.Length > 4) | 1184 | if (cmdparams.Length > 4) |
1185 | { | 1185 | { |
1186 | loadOffset.X = (float) Convert.ToDecimal(cmdparams[4]); | 1186 | loadOffset.X = (float)Convert.ToDecimal(cmdparams[4], Culture.NumberFormatInfo); |
1187 | if (cmdparams.Length > 5) | 1187 | if (cmdparams.Length > 5) |
1188 | { | 1188 | { |
1189 | loadOffset.Y = (float) Convert.ToDecimal(cmdparams[5]); | 1189 | loadOffset.Y = (float)Convert.ToDecimal(cmdparams[5], Culture.NumberFormatInfo); |
1190 | } | 1190 | } |
1191 | if (cmdparams.Length > 6) | 1191 | if (cmdparams.Length > 6) |
1192 | { | 1192 | { |
1193 | loadOffset.Z = (float) Convert.ToDecimal(cmdparams[6]); | 1193 | loadOffset.Z = (float)Convert.ToDecimal(cmdparams[6], Culture.NumberFormatInfo); |
1194 | } | 1194 | } |
1195 | MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z)); | 1195 | MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z)); |
1196 | } | 1196 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index e38232c..e39323f 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -8307,8 +8307,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8307 | { | 8307 | { |
8308 | OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), | 8308 | OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), |
8309 | convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), | 8309 | convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), |
8310 | Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter))), | 8310 | Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter), Culture.NumberFormatInfo)), |
8311 | (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)), | 8311 | (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo), |
8312 | Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), | 8312 | Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), |
8313 | convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); | 8313 | convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); |
8314 | } | 8314 | } |
@@ -8356,8 +8356,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8356 | if (splitField.Length == 3) | 8356 | if (splitField.Length == 3) |
8357 | { | 8357 | { |
8358 | Int16 corner = Convert.ToInt16(splitField[0]); | 8358 | Int16 corner = Convert.ToInt16(splitField[0]); |
8359 | float lowValue = (float)Convert.ToDecimal(splitField[1]); | 8359 | float lowValue = (float)Convert.ToDecimal(splitField[1], Culture.NumberFormatInfo); |
8360 | float highValue = (float)Convert.ToDecimal(splitField[2]); | 8360 | float highValue = (float)Convert.ToDecimal(splitField[2], Culture.NumberFormatInfo); |
8361 | 8361 | ||
8362 | OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); | 8362 | OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); |
8363 | } | 8363 | } |
@@ -8380,19 +8380,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8380 | { | 8380 | { |
8381 | string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); | 8381 | string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); |
8382 | if (!tmp.Contains(".")) tmp += ".00"; | 8382 | if (!tmp.Contains(".")) tmp += ".00"; |
8383 | float WaterHeight = (float)Convert.ToDecimal(tmp); | 8383 | float WaterHeight = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); |
8384 | tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); | 8384 | tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); |
8385 | if (!tmp.Contains(".")) tmp += ".00"; | 8385 | if (!tmp.Contains(".")) tmp += ".00"; |
8386 | float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp); | 8386 | float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); |
8387 | tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); | 8387 | tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); |
8388 | if (!tmp.Contains(".")) tmp += ".00"; | 8388 | if (!tmp.Contains(".")) tmp += ".00"; |
8389 | float TerrainLowerLimit = (float)Convert.ToDecimal(tmp); | 8389 | float TerrainLowerLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); |
8390 | bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); | 8390 | bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); |
8391 | bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); | 8391 | bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); |
8392 | float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)); | 8392 | float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo); |
8393 | bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); | 8393 | bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); |
8394 | bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); | 8394 | bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); |
8395 | float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter)); | 8395 | float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter), Culture.NumberFormatInfo); |
8396 | 8396 | ||
8397 | OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); | 8397 | OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); |
8398 | 8398 | ||
@@ -13924,8 +13924,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
13924 | { | 13924 | { |
13925 | OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), | 13925 | OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), |
13926 | convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), | 13926 | convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), |
13927 | Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter))), | 13927 | Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter), Culture.NumberFormatInfo)), |
13928 | (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)), | 13928 | (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo), |
13929 | Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), | 13929 | Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)), |
13930 | convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); | 13930 | convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter)); |
13931 | } | 13931 | } |
@@ -13973,8 +13973,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
13973 | if (splitField.Length == 3) | 13973 | if (splitField.Length == 3) |
13974 | { | 13974 | { |
13975 | Int16 corner = Convert.ToInt16(splitField[0]); | 13975 | Int16 corner = Convert.ToInt16(splitField[0]); |
13976 | float lowValue = (float)Convert.ToDecimal(splitField[1]); | 13976 | float lowValue = (float)Convert.ToDecimal(splitField[1], Culture.NumberFormatInfo); |
13977 | float highValue = (float)Convert.ToDecimal(splitField[2]); | 13977 | float highValue = (float)Convert.ToDecimal(splitField[2], Culture.NumberFormatInfo); |
13978 | 13978 | ||
13979 | OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); | 13979 | OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue); |
13980 | } | 13980 | } |
@@ -13997,19 +13997,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
13997 | { | 13997 | { |
13998 | string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); | 13998 | string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter); |
13999 | if (!tmp.Contains(".")) tmp += ".00"; | 13999 | if (!tmp.Contains(".")) tmp += ".00"; |
14000 | float WaterHeight = (float)Convert.ToDecimal(tmp); | 14000 | float WaterHeight = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); |
14001 | tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); | 14001 | tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); |
14002 | if (!tmp.Contains(".")) tmp += ".00"; | 14002 | if (!tmp.Contains(".")) tmp += ".00"; |
14003 | float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp); | 14003 | float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); |
14004 | tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); | 14004 | tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter); |
14005 | if (!tmp.Contains(".")) tmp += ".00"; | 14005 | if (!tmp.Contains(".")) tmp += ".00"; |
14006 | float TerrainLowerLimit = (float)Convert.ToDecimal(tmp); | 14006 | float TerrainLowerLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo); |
14007 | bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); | 14007 | bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter); |
14008 | bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); | 14008 | bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter); |
14009 | float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)); | 14009 | float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo); |
14010 | bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); | 14010 | bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter); |
14011 | bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); | 14011 | bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter); |
14012 | float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter)); | 14012 | float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter), Culture.NumberFormatInfo); |
14013 | 14013 | ||
14014 | OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); | 14014 | OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour); |
14015 | 14015 | ||
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs b/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs index 776d5d1..cb1766a 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs | |||
@@ -673,13 +673,13 @@ namespace OpenSim.Region.Communications.OGS1 | |||
673 | else | 673 | else |
674 | userData.HomeRegionID = UUID.Zero; | 674 | userData.HomeRegionID = UUID.Zero; |
675 | userData.HomeLocation = | 675 | userData.HomeLocation = |
676 | new Vector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), | 676 | new Vector3((float)Convert.ToDecimal((string)data["home_coordinates_x"], Culture.NumberFormatInfo), |
677 | (float)Convert.ToDecimal((string)data["home_coordinates_y"]), | 677 | (float)Convert.ToDecimal((string)data["home_coordinates_y"], Culture.NumberFormatInfo), |
678 | (float)Convert.ToDecimal((string)data["home_coordinates_z"])); | 678 | (float)Convert.ToDecimal((string)data["home_coordinates_z"], Culture.NumberFormatInfo)); |
679 | userData.HomeLookAt = | 679 | userData.HomeLookAt = |
680 | new Vector3((float)Convert.ToDecimal((string)data["home_look_x"]), | 680 | new Vector3((float)Convert.ToDecimal((string)data["home_look_x"], Culture.NumberFormatInfo), |
681 | (float)Convert.ToDecimal((string)data["home_look_y"]), | 681 | (float)Convert.ToDecimal((string)data["home_look_y"], Culture.NumberFormatInfo), |
682 | (float)Convert.ToDecimal((string)data["home_look_z"])); | 682 | (float)Convert.ToDecimal((string)data["home_look_z"], Culture.NumberFormatInfo)); |
683 | if (data.Contains("user_flags")) | 683 | if (data.Contains("user_flags")) |
684 | userData.UserFlags = Convert.ToInt32((string)data["user_flags"]); | 684 | userData.UserFlags = Convert.ToInt32((string)data["user_flags"]); |
685 | if (data.Contains("god_level")) | 685 | if (data.Contains("god_level")) |
diff --git a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs index 9fe669a..4004135 100644 --- a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs +++ b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs | |||
@@ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander | |||
147 | m_args[i].ArgumentValue = Int32.Parse(arg.ToString()); | 147 | m_args[i].ArgumentValue = Int32.Parse(arg.ToString()); |
148 | break; | 148 | break; |
149 | case "Double": | 149 | case "Double": |
150 | m_args[i].ArgumentValue = Double.Parse(arg.ToString()); | 150 | m_args[i].ArgumentValue = Double.Parse(arg.ToString(), OpenSim.Framework.Culture.NumberFormatInfo); |
151 | break; | 151 | break; |
152 | case "Boolean": | 152 | case "Boolean": |
153 | m_args[i].ArgumentValue = Boolean.Parse(arg.ToString()); | 153 | m_args[i].ArgumentValue = Boolean.Parse(arg.ToString()); |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 695cced..03da269 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -974,8 +974,8 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
974 | if (y == -1 || m_scene.RegionInfo.RegionLocY == y) | 974 | if (y == -1 || m_scene.RegionInfo.RegionLocY == y) |
975 | { | 975 | { |
976 | int corner = int.Parse(num); | 976 | int corner = int.Parse(num); |
977 | float lowValue = float.Parse(min); | 977 | float lowValue = float.Parse(min, Culture.NumberFormatInfo); |
978 | float highValue = float.Parse(max); | 978 | float highValue = float.Parse(max, Culture.NumberFormatInfo); |
979 | 979 | ||
980 | m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName + | 980 | m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName + |
981 | string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue)); | 981 | string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue)); |
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index e3fbb6e..c8e6e4b 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs | |||
@@ -104,9 +104,9 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator | |||
104 | this.m_name = field[1].Trim(); | 104 | this.m_name = field[1].Trim(); |
105 | this.m_frozen = (copsedef[0] == 'F'); | 105 | this.m_frozen = (copsedef[0] == 'F'); |
106 | this.m_tree_quantity = int.Parse(field[2]); | 106 | this.m_tree_quantity = int.Parse(field[2]); |
107 | this.m_treeline_high = float.Parse(field[3]); | 107 | this.m_treeline_high = float.Parse(field[3], Culture.NumberFormatInfo); |
108 | this.m_treeline_low = float.Parse(field[4]); | 108 | this.m_treeline_low = float.Parse(field[4], Culture.NumberFormatInfo); |
109 | this.m_range = double.Parse(field[5]); | 109 | this.m_range = double.Parse(field[5], Culture.NumberFormatInfo); |
110 | this.m_tree_type = (Tree) Enum.Parse(typeof(Tree),field[6]); | 110 | this.m_tree_type = (Tree) Enum.Parse(typeof(Tree),field[6]); |
111 | this.m_seed_point = Vector3.Parse(field[7]); | 111 | this.m_seed_point = Vector3.Parse(field[7]); |
112 | this.m_initial_scale = Vector3.Parse(field[8]); | 112 | this.m_initial_scale = Vector3.Parse(field[8]); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs index bf3d335..bcdc7bf 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs | |||
@@ -389,7 +389,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
389 | break; | 389 | break; |
390 | case "MinEventDelay": | 390 | case "MinEventDelay": |
391 | double minEventDelay = 0.0; | 391 | double minEventDelay = 0.0; |
392 | double.TryParse(part.InnerText, out minEventDelay); | 392 | double.TryParse(part.InnerText, NumberStyles.Float, Culture.NumberFormatInfo, out minEventDelay); |
393 | instance.MinEventDelay = minEventDelay; | 393 | instance.MinEventDelay = minEventDelay; |
394 | break; | 394 | break; |
395 | } | 395 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index faf9c40..e87b1f4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -72,9 +72,9 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
72 | return; | 72 | return; |
73 | } | 73 | } |
74 | bool res; | 74 | bool res; |
75 | res = Double.TryParse(tmps[0], out x); | 75 | res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x); |
76 | res = res & Double.TryParse(tmps[1], out y); | 76 | res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y); |
77 | res = res & Double.TryParse(tmps[2], out z); | 77 | res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z); |
78 | } | 78 | } |
79 | 79 | ||
80 | #endregion | 80 | #endregion |
@@ -309,10 +309,10 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
309 | return; | 309 | return; |
310 | } | 310 | } |
311 | bool res; | 311 | bool res; |
312 | res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.FormatProvider, out x); | 312 | res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x); |
313 | res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.FormatProvider, out y); | 313 | res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y); |
314 | res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.FormatProvider, out z); | 314 | res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z); |
315 | res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.FormatProvider, out s); | 315 | res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.NumberFormatInfo, out s); |
316 | if (x == 0 && y == 0 && z == 0 && s == 0) | 316 | if (x == 0 && y == 0 && z == 0 && s == 0) |
317 | s = 1; | 317 | s = 1; |
318 | } | 318 | } |
@@ -1015,7 +1015,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1015 | double entry; | 1015 | double entry; |
1016 | for (int i = 0; i < Data.Length; i++) | 1016 | for (int i = 0; i < Data.Length; i++) |
1017 | { | 1017 | { |
1018 | if (double.TryParse(Data[i].ToString(), out entry)) | 1018 | if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) |
1019 | { | 1019 | { |
1020 | if (entry < minimum) minimum = entry; | 1020 | if (entry < minimum) minimum = entry; |
1021 | } | 1021 | } |
@@ -1029,7 +1029,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1029 | double entry; | 1029 | double entry; |
1030 | for (int i = 0; i < Data.Length; i++) | 1030 | for (int i = 0; i < Data.Length; i++) |
1031 | { | 1031 | { |
1032 | if (double.TryParse(Data[i].ToString(), out entry)) | 1032 | if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) |
1033 | { | 1033 | { |
1034 | if (entry > maximum) maximum = entry; | 1034 | if (entry > maximum) maximum = entry; |
1035 | } | 1035 | } |
@@ -1048,7 +1048,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1048 | double entry; | 1048 | double entry; |
1049 | for (int i = 0; i < Data.Length; i++) | 1049 | for (int i = 0; i < Data.Length; i++) |
1050 | { | 1050 | { |
1051 | if (double.TryParse(Data[i].ToString(), out entry)) | 1051 | if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) |
1052 | { | 1052 | { |
1053 | count++; | 1053 | count++; |
1054 | } | 1054 | } |
@@ -1062,7 +1062,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1062 | double entry; | 1062 | double entry; |
1063 | for (int i = 0; i < src.Data.Length - 1; i++) | 1063 | for (int i = 0; i < src.Data.Length - 1; i++) |
1064 | { | 1064 | { |
1065 | if (double.TryParse(src.Data[i].ToString(), out entry)) | 1065 | if (double.TryParse(src.Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) |
1066 | { | 1066 | { |
1067 | ret.Add(entry); | 1067 | ret.Add(entry); |
1068 | } | 1068 | } |
@@ -1076,7 +1076,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1076 | double entry; | 1076 | double entry; |
1077 | for (int i = 0; i < Data.Length; i++) | 1077 | for (int i = 0; i < Data.Length; i++) |
1078 | { | 1078 | { |
1079 | if (double.TryParse(Data[i].ToString(), out entry)) | 1079 | if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) |
1080 | { | 1080 | { |
1081 | sum = sum + entry; | 1081 | sum = sum + entry; |
1082 | } | 1082 | } |
@@ -1090,7 +1090,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1090 | double entry; | 1090 | double entry; |
1091 | for (int i = 0; i < Data.Length; i++) | 1091 | for (int i = 0; i < Data.Length; i++) |
1092 | { | 1092 | { |
1093 | if (double.TryParse(Data[i].ToString(), out entry)) | 1093 | if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry)) |
1094 | { | 1094 | { |
1095 | sum = sum + Math.Pow(entry, 2); | 1095 | sum = sum + Math.Pow(entry, 2); |
1096 | } | 1096 | } |
@@ -1213,11 +1213,11 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1213 | { | 1213 | { |
1214 | double a; | 1214 | double a; |
1215 | double b; | 1215 | double b; |
1216 | if (!double.TryParse(x.ToString(), out a)) | 1216 | if (!double.TryParse(x.ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out a)) |
1217 | { | 1217 | { |
1218 | a = 0.0; | 1218 | a = 0.0; |
1219 | } | 1219 | } |
1220 | if (!double.TryParse(y.ToString(), out b)) | 1220 | if (!double.TryParse(y.ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out b)) |
1221 | { | 1221 | { |
1222 | b = 0.0; | 1222 | b = 0.0; |
1223 | } | 1223 | } |
@@ -1857,7 +1857,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1857 | else | 1857 | else |
1858 | if (v.EndsWith(".")) | 1858 | if (v.EndsWith(".")) |
1859 | v = v + "0"; | 1859 | v = v + "0"; |
1860 | this.value = double.Parse(v, System.Globalization.NumberStyles.Float, Culture.FormatProvider); | 1860 | this.value = double.Parse(v, System.Globalization.NumberStyles.Float, Culture.NumberFormatInfo); |
1861 | } | 1861 | } |
1862 | 1862 | ||
1863 | #endregion | 1863 | #endregion |
diff --git a/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs b/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs index 115ac29..7cc0dfa 100644 --- a/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs +++ b/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs | |||
@@ -132,9 +132,9 @@ namespace OpenSim.Server.Handlers.Grid | |||
132 | userData.SurName = (string)requestData["lastname"]; | 132 | userData.SurName = (string)requestData["lastname"]; |
133 | userData.ID = new UUID((string)requestData["agent_id"]); | 133 | userData.ID = new UUID((string)requestData["agent_id"]); |
134 | UUID sessionID = new UUID((string)requestData["session_id"]); | 134 | UUID sessionID = new UUID((string)requestData["session_id"]); |
135 | userData.HomeLocation = new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"]), | 135 | userData.HomeLocation = new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"], Culture.NumberFormatInfo), |
136 | (float)Convert.ToDecimal((string)requestData["startpos_y"]), | 136 | (float)Convert.ToDecimal((string)requestData["startpos_y"], Culture.NumberFormatInfo), |
137 | (float)Convert.ToDecimal((string)requestData["startpos_z"])); | 137 | (float)Convert.ToDecimal((string)requestData["startpos_z"], Culture.NumberFormatInfo)); |
138 | 138 | ||
139 | userData.UserServerURI = (string)requestData["userserver_id"]; | 139 | userData.UserServerURI = (string)requestData["userserver_id"]; |
140 | userData.UserAssetURI = (string)requestData["assetserver_id"]; | 140 | userData.UserAssetURI = (string)requestData["assetserver_id"]; |