From 00800c59d35662d65aeb61a17de0d56fa6196509 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 12 Feb 2010 23:13:35 +0000 Subject: 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. --- OpenSim/Region/Communications/OGS1/OGS1UserDataPlugin.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Communications') 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 else userData.HomeRegionID = UUID.Zero; userData.HomeLocation = - new Vector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), - (float)Convert.ToDecimal((string)data["home_coordinates_y"]), - (float)Convert.ToDecimal((string)data["home_coordinates_z"])); + new Vector3((float)Convert.ToDecimal((string)data["home_coordinates_x"], Culture.NumberFormatInfo), + (float)Convert.ToDecimal((string)data["home_coordinates_y"], Culture.NumberFormatInfo), + (float)Convert.ToDecimal((string)data["home_coordinates_z"], Culture.NumberFormatInfo)); userData.HomeLookAt = - new Vector3((float)Convert.ToDecimal((string)data["home_look_x"]), - (float)Convert.ToDecimal((string)data["home_look_y"]), - (float)Convert.ToDecimal((string)data["home_look_z"])); + new Vector3((float)Convert.ToDecimal((string)data["home_look_x"], Culture.NumberFormatInfo), + (float)Convert.ToDecimal((string)data["home_look_y"], Culture.NumberFormatInfo), + (float)Convert.ToDecimal((string)data["home_look_z"], Culture.NumberFormatInfo)); if (data.Contains("user_flags")) userData.UserFlags = Convert.ToInt32((string)data["user_flags"]); if (data.Contains("god_level")) -- cgit v1.1