aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
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/Region
parentminor: remove completely commented out and unused class (diff)
downloadopensim-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/Region')
-rwxr-xr-xOpenSim/Region/Application/OpenSim.cs6
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs36
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs12
-rw-r--r--OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs4
-rw-r--r--OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs32
8 files changed, 50 insertions, 50 deletions
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