aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs20
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 93a6300..cb1c7ce 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -27,7 +27,9 @@
27 27
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Globalization;
30using System.Text.RegularExpressions; 31using System.Text.RegularExpressions;
32using OpenSim.Framework;
31 33
32namespace OpenSim.Region.ScriptEngine.Shared 34namespace OpenSim.Region.ScriptEngine.Shared
33{ 35{
@@ -307,10 +309,10 @@ namespace OpenSim.Region.ScriptEngine.Shared
307 return; 309 return;
308 } 310 }
309 bool res; 311 bool res;
310 res = Double.TryParse(tmps[0], out x); 312 res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.FormatProvider, out x);
311 res = res & Double.TryParse(tmps[1], out y); 313 res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.FormatProvider, out y);
312 res = res & Double.TryParse(tmps[2], out z); 314 res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.FormatProvider, out z);
313 res = res & Double.TryParse(tmps[3], out s); 315 res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.FormatProvider, out s);
314 if (x == 0 && y == 0 && z == 0 && s == 0) 316 if (x == 0 && y == 0 && z == 0 && s == 0)
315 s = 1; 317 s = 1;
316 } 318 }
@@ -335,7 +337,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
335 337
336 public override string ToString() 338 public override string ToString()
337 { 339 {
338 string st=String.Format("<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", x, y, z, s); 340 string st=String.Format(Culture.FormatProvider, "<{0:0.000000},{1:0.000000},{2:0.000000},{3:0.000000}>", x, y, z, s);
339 return st; 341 return st;
340 } 342 }
341 343
@@ -1319,13 +1321,13 @@ namespace OpenSim.Region.ScriptEngine.Shared
1319 1321
1320 public LSLString(double d) 1322 public LSLString(double d)
1321 { 1323 {
1322 string s=String.Format("{0:0.000000}", d); 1324 string s=String.Format(Culture.FormatProvider, "{0:0.000000}", d);
1323 m_string=s; 1325 m_string=s;
1324 } 1326 }
1325 1327
1326 public LSLString(LSLFloat f) 1328 public LSLString(LSLFloat f)
1327 { 1329 {
1328 string s=String.Format("{0:0.000000}", f.value); 1330 string s = String.Format(Culture.FormatProvider, "{0:0.000000}", f.value);
1329 m_string=s; 1331 m_string=s;
1330 } 1332 }
1331 1333
@@ -1787,7 +1789,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1787 else 1789 else
1788 if (v.EndsWith(".")) 1790 if (v.EndsWith("."))
1789 v = v + "0"; 1791 v = v + "0";
1790 this.value = double.Parse(v, System.Globalization.NumberStyles.Float); 1792 this.value = double.Parse(v, System.Globalization.NumberStyles.Float, Culture.FormatProvider);
1791 } 1793 }
1792 1794
1793 #endregion 1795 #endregion
@@ -1932,7 +1934,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
1932 1934
1933 public override string ToString() 1935 public override string ToString()
1934 { 1936 {
1935 return String.Format("{0:0.000000}", this.value); 1937 return String.Format(Culture.FormatProvider, "{0:0.000000}", this.value);
1936 } 1938 }
1937 1939
1938 public override bool Equals(Object o) 1940 public override bool Equals(Object o)