aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/General/Configuration/ConfigurationMember.cs9
-rw-r--r--OpenSim/Framework/General/Culture.cs26
-rw-r--r--OpenSim/Framework/General/Types/EstateSettings.cs4
-rw-r--r--OpenSim/Region/Application/Application.cs6
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs7
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs6
7 files changed, 44 insertions, 16 deletions
diff --git a/OpenSim/Framework/General/Configuration/ConfigurationMember.cs b/OpenSim/Framework/General/Configuration/ConfigurationMember.cs
index c94fd8e..e4c13ba 100644
--- a/OpenSim/Framework/General/Configuration/ConfigurationMember.cs
+++ b/OpenSim/Framework/General/Configuration/ConfigurationMember.cs
@@ -9,6 +9,7 @@ using libsecondlife;
9 9
10using OpenSim.Framework.Console; 10using OpenSim.Framework.Console;
11using OpenSim.Framework.Configuration.Interfaces; 11using OpenSim.Framework.Configuration.Interfaces;
12using System.Globalization;
12 13
13namespace OpenSim.Framework.Configuration 14namespace OpenSim.Framework.Configuration
14{ 15{
@@ -295,7 +296,7 @@ namespace OpenSim.Framework.Configuration
295 break; 296 break;
296 case ConfigurationOption.ConfigurationTypes.TYPE_FLOAT: 297 case ConfigurationOption.ConfigurationTypes.TYPE_FLOAT:
297 float floatResult; 298 float floatResult;
298 if (float.TryParse(console_result, out floatResult)) 299 if (float.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, out floatResult))
299 { 300 {
300 convertSuccess = true; 301 convertSuccess = true;
301 return_result = floatResult; 302 return_result = floatResult;
@@ -304,7 +305,7 @@ namespace OpenSim.Framework.Configuration
304 break; 305 break;
305 case ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE: 306 case ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE:
306 double doubleResult; 307 double doubleResult;
307 if (Double.TryParse(console_result, out doubleResult)) 308 if (Double.TryParse(console_result, NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, out doubleResult))
308 { 309 {
309 convertSuccess = true; 310 convertSuccess = true;
310 return_result = doubleResult; 311 return_result = doubleResult;
@@ -332,12 +333,12 @@ namespace OpenSim.Framework.Configuration
332 { 333 {
333 if (configOption.configurationUseDefaultNoPrompt) 334 if (configOption.configurationUseDefaultNoPrompt)
334 { 335 {
335 MainLog.Instance.Error("Default given for '" + configOption.configurationKey + "' is not valid; the configuration result must be " + errorMessage + ". Will skip this option..."); 336 MainLog.Instance.Error("CONFIG", string.Format("[{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n", configOption.configurationKey, console_result, errorMessage, configurationFilename));
336 convertSuccess = true; 337 convertSuccess = true;
337 } 338 }
338 else 339 else
339 { 340 {
340 MainLog.Instance.Warn("configuration","Incorrect result given, the configuration option must be " + errorMessage + ". Prompting for same option..."); 341 MainLog.Instance.Warn("CONFIG", string.Format("[{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n", configOption.configurationKey, console_result, errorMessage, configurationFilename));
341 ignoreNextFromConfig = true; 342 ignoreNextFromConfig = true;
342 } 343 }
343 } 344 }
diff --git a/OpenSim/Framework/General/Culture.cs b/OpenSim/Framework/General/Culture.cs
new file mode 100644
index 0000000..8f8561b
--- /dev/null
+++ b/OpenSim/Framework/General/Culture.cs
@@ -0,0 +1,26 @@
1using System;
2using System.Collections.Generic;
3using System.Globalization;
4using System.Text;
5using System.Threading;
6
7namespace OpenSim.Framework
8{
9 public class Culture
10 {
11 private static readonly CultureInfo m_cultureInfo = new System.Globalization.CultureInfo("en-US", true);
12
13 public static NumberFormatInfo NumberFormatInfo
14 {
15 get
16 {
17 return m_cultureInfo.NumberFormat;
18 }
19 }
20
21 public static void SetCurrentCulture()
22 {
23 Thread.CurrentThread.CurrentCulture = m_cultureInfo;
24 }
25 }
26}
diff --git a/OpenSim/Framework/General/Types/EstateSettings.cs b/OpenSim/Framework/General/Types/EstateSettings.cs
index a8f6bf1..abdcf6f 100644
--- a/OpenSim/Framework/General/Types/EstateSettings.cs
+++ b/OpenSim/Framework/General/Types/EstateSettings.cs
@@ -29,6 +29,7 @@ using System.IO;
29using libsecondlife; 29using libsecondlife;
30using OpenSim.Framework.Configuration; 30using OpenSim.Framework.Configuration;
31using OpenSim.Framework.Utilities; 31using OpenSim.Framework.Utilities;
32using System.Globalization;
32 33
33namespace OpenSim.Framework.Types 34namespace OpenSim.Framework.Types
34{ 35{
@@ -719,7 +720,8 @@ namespace OpenSim.Framework.Types
719 this.m_terrainMultiplier = System.Convert.ToDouble(configuration_result); 720 this.m_terrainMultiplier = System.Convert.ToDouble(configuration_result);
720 break; 721 break;
721 case "water_height": 722 case "water_height":
722 float.TryParse(((double)configuration_result).ToString(),out this.m_waterHeight); 723 double tmpVal = (double) configuration_result;
724 this.m_waterHeight = (float) tmpVal;
723 break; 725 break;
724 case "terrain_image_id": 726 case "terrain_image_id":
725 this.m_terrainImageID = (LLUUID)configuration_result; 727 this.m_terrainImageID = (LLUUID)configuration_result;
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index 572f034..ec7c43d 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -29,6 +29,8 @@ using System;
29using OpenSim.Framework.Console; 29using OpenSim.Framework.Console;
30using OpenSim.Region.Environment.Scenes; 30using OpenSim.Region.Environment.Scenes;
31using Nini.Config; 31using Nini.Config;
32using System.Threading;
33using OpenSim.Framework;
32 34
33namespace OpenSim 35namespace OpenSim
34{ 36{
@@ -55,9 +57,7 @@ namespace OpenSim
55 57
56 Console.WriteLine("Starting...\n"); 58 Console.WriteLine("Starting...\n");
57 59
58 // Set current culture 60 Culture.SetCurrentCulture();
59
60 System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(""); // en
61 61
62 ArgvConfigSource configSource = new ArgvConfigSource(args); 62 ArgvConfigSource configSource = new ArgvConfigSource(args);
63 63
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index d3b4e49..dad6afd 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -44,6 +44,8 @@ using OpenSim.Region.Communications.OGS1;
44using OpenSim.Region.Environment; 44using OpenSim.Region.Environment;
45using OpenSim.Region.Environment.Scenes; 45using OpenSim.Region.Environment.Scenes;
46using OpenSim.Region.Physics.Manager; 46using OpenSim.Region.Physics.Manager;
47using System.Globalization;
48using RegionInfo=OpenSim.Framework.Types.RegionInfo;
47 49
48namespace OpenSim 50namespace OpenSim
49{ 51{
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 5849519..5fbe918 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -54,6 +54,7 @@ namespace OpenSim.Region.Environment.Scenes
54{ 54{
55 public partial class Scene : SceneBase 55 public partial class Scene : SceneBase
56 { 56 {
57
57 public delegate bool FilterAvatarList(ScenePresence avatar); 58 public delegate bool FilterAvatarList(ScenePresence avatar);
58 59
59 protected Timer m_heartbeatTimer = new Timer(); 60 protected Timer m_heartbeatTimer = new Timer();
@@ -160,12 +161,6 @@ namespace OpenSim.Region.Environment.Scenes
160 161
161 #region Constructors 162 #region Constructors
162 163
163 /// <summary>
164 /// Creates a new Scene class, and a region to go with it.
165 /// </summary>
166 /// <param name="clientThreads">Dictionary to contain client threads</param>
167 /// <param name="regionHandle">Region Handle for this region</param>
168 /// <param name="regionName">Region Name for this region</param>
169 public Scene(RegionInfo regInfo, AgentCircuitManager authen, CommunicationsManager commsMan, 164 public Scene(RegionInfo regInfo, AgentCircuitManager authen, CommunicationsManager commsMan,
170 AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer, 165 AssetCache assetCach, StorageManager storeManager, BaseHttpServer httpServer,
171 ModuleLoader moduleLoader) 166 ModuleLoader moduleLoader)
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
index 6454bdc..c3c4935 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
@@ -33,6 +33,8 @@ using System.IO;
33using libTerrain; 33using libTerrain;
34using OpenJPEGNet; 34using OpenJPEGNet;
35using OpenSim.Framework.Interfaces; 35using OpenSim.Framework.Interfaces;
36using System.Globalization;
37using OpenSim.Framework;
36 38
37namespace OpenSim.Region.Terrain 39namespace OpenSim.Region.Terrain
38{ 40{
@@ -603,8 +605,8 @@ namespace OpenSim.Region.Terrain
603 if (args.GetLength(0) > 2) 605 if (args.GetLength(0) > 2)
604 { 606 {
605 int.TryParse(args[2].ToString(), out count); 607 int.TryParse(args[2].ToString(), out count);
606 double.TryParse(args[3].ToString(), out sizeMin); 608 double.TryParse(args[3].ToString(), NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, out sizeMin);
607 double.TryParse(args[4].ToString(), out sizeRange); 609 double.TryParse(args[4].ToString(), NumberStyles.AllowDecimalPoint, Culture.NumberFormatInfo, out sizeRange);
608 bool.TryParse(args[5].ToString(), out island); 610 bool.TryParse(args[5].ToString(), out island);
609 bool.TryParse(args[6].ToString(), out additive); 611 bool.TryParse(args[6].ToString(), out additive);
610 bool.TryParse(args[7].ToString(), out noisy); 612 bool.TryParse(args[7].ToString(), out noisy);