aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs32
2 files changed, 17 insertions, 17 deletions
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