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.0.6.9
parent
aad95fcff5
commit
00800c59d3
|
@ -29,6 +29,7 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
using OpenSim.Framework;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Servers.HttpServer;
|
using OpenSim.Framework.Servers.HttpServer;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
|
@ -156,8 +157,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
|
||||||
Vector3 min, max;
|
Vector3 min, max;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
min = new Vector3((float)Double.Parse(subregion[0]), (float)Double.Parse(subregion[1]), (float)Double.Parse(subregion[2]));
|
min = new Vector3((float)Double.Parse(subregion[0], Culture.NumberFormatInfo), (float)Double.Parse(subregion[1], Culture.NumberFormatInfo), (float)Double.Parse(subregion[2], Culture.NumberFormatInfo));
|
||||||
max = new Vector3((float)Double.Parse(subregion[3]), (float)Double.Parse(subregion[4]), (float)Double.Parse(subregion[5]));
|
max = new Vector3((float)Double.Parse(subregion[3], Culture.NumberFormatInfo), (float)Double.Parse(subregion[4], Culture.NumberFormatInfo), (float)Double.Parse(subregion[5], Culture.NumberFormatInfo));
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
|
@ -218,9 +218,9 @@ namespace OpenSim.Client.Linden
|
||||||
{
|
{
|
||||||
//m_log.Debug("[CLIENT]: Main agent detected");
|
//m_log.Debug("[CLIENT]: Main agent detected");
|
||||||
agentData.startpos =
|
agentData.startpos =
|
||||||
new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"]),
|
new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"], Culture.NumberFormatInfo),
|
||||||
(float)Convert.ToDecimal((string)requestData["startpos_y"]),
|
(float)Convert.ToDecimal((string)requestData["startpos_y"], Culture.NumberFormatInfo),
|
||||||
(float)Convert.ToDecimal((string)requestData["startpos_z"]));
|
(float)Convert.ToDecimal((string)requestData["startpos_z"], Culture.NumberFormatInfo));
|
||||||
agentData.child = false;
|
agentData.child = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1015,8 +1015,8 @@ namespace OpenSim.Framework.Communications.Services
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
theUser.CurrentAgent.Position = new Vector3(float.Parse(uriMatch.Groups["x"].Value),
|
theUser.CurrentAgent.Position = new Vector3(float.Parse(uriMatch.Groups["x"].Value, Culture.NumberFormatInfo),
|
||||||
float.Parse(uriMatch.Groups["y"].Value), float.Parse(uriMatch.Groups["z"].Value));
|
float.Parse(uriMatch.Groups["y"].Value, Culture.NumberFormatInfo), float.Parse(uriMatch.Groups["z"].Value, Culture.NumberFormatInfo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
response.LookAt = "[r0,r1,r0]";
|
response.LookAt = "[r0,r1,r0]";
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public class Culture
|
public class Culture
|
||||||
{
|
{
|
||||||
private static readonly CultureInfo m_cultureInfo = new CultureInfo("en-US", true);
|
private static readonly CultureInfo m_cultureInfo = new CultureInfo("en-US", false);
|
||||||
|
|
||||||
public static NumberFormatInfo NumberFormatInfo
|
public static NumberFormatInfo NumberFormatInfo
|
||||||
{
|
{
|
||||||
|
|
|
@ -109,7 +109,7 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
settings.AgentLimit = int.Parse(xtr.ReadElementContentAsString());
|
settings.AgentLimit = int.Parse(xtr.ReadElementContentAsString());
|
||||||
break;
|
break;
|
||||||
case "ObjectBonus":
|
case "ObjectBonus":
|
||||||
settings.ObjectBonus = double.Parse(xtr.ReadElementContentAsString());
|
settings.ObjectBonus = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,28 +134,28 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
settings.TerrainTexture4 = UUID.Parse(xtr.ReadElementContentAsString());
|
settings.TerrainTexture4 = UUID.Parse(xtr.ReadElementContentAsString());
|
||||||
break;
|
break;
|
||||||
case "ElevationLowSW":
|
case "ElevationLowSW":
|
||||||
settings.Elevation1SW = double.Parse(xtr.ReadElementContentAsString());
|
settings.Elevation1SW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
|
||||||
break;
|
break;
|
||||||
case "ElevationLowNW":
|
case "ElevationLowNW":
|
||||||
settings.Elevation1NW = double.Parse(xtr.ReadElementContentAsString());
|
settings.Elevation1NW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
|
||||||
break;
|
break;
|
||||||
case "ElevationLowSE":
|
case "ElevationLowSE":
|
||||||
settings.Elevation1SE = double.Parse(xtr.ReadElementContentAsString());
|
settings.Elevation1SE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
|
||||||
break;
|
break;
|
||||||
case "ElevationLowNE":
|
case "ElevationLowNE":
|
||||||
settings.Elevation1NE = double.Parse(xtr.ReadElementContentAsString());
|
settings.Elevation1NE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
|
||||||
break;
|
break;
|
||||||
case "ElevationHighSW":
|
case "ElevationHighSW":
|
||||||
settings.Elevation2SW = double.Parse(xtr.ReadElementContentAsString());
|
settings.Elevation2SW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
|
||||||
break;
|
break;
|
||||||
case "ElevationHighNW":
|
case "ElevationHighNW":
|
||||||
settings.Elevation2NW = double.Parse(xtr.ReadElementContentAsString());
|
settings.Elevation2NW = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
|
||||||
break;
|
break;
|
||||||
case "ElevationHighSE":
|
case "ElevationHighSE":
|
||||||
settings.Elevation2SE = double.Parse(xtr.ReadElementContentAsString());
|
settings.Elevation2SE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
|
||||||
break;
|
break;
|
||||||
case "ElevationHighNE":
|
case "ElevationHighNE":
|
||||||
settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString());
|
settings.Elevation2NE = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -168,13 +168,13 @@ namespace OpenSim.Framework.Serialization.External
|
||||||
switch (xtr.Name)
|
switch (xtr.Name)
|
||||||
{
|
{
|
||||||
case "WaterHeight":
|
case "WaterHeight":
|
||||||
settings.WaterHeight = double.Parse(xtr.ReadElementContentAsString());
|
settings.WaterHeight = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
|
||||||
break;
|
break;
|
||||||
case "TerrainRaiseLimit":
|
case "TerrainRaiseLimit":
|
||||||
settings.TerrainRaiseLimit = double.Parse(xtr.ReadElementContentAsString());
|
settings.TerrainRaiseLimit = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
|
||||||
break;
|
break;
|
||||||
case "TerrainLowerLimit":
|
case "TerrainLowerLimit":
|
||||||
settings.TerrainLowerLimit = double.Parse(xtr.ReadElementContentAsString());
|
settings.TerrainLowerLimit = double.Parse(xtr.ReadElementContentAsString(), Culture.NumberFormatInfo);
|
||||||
break;
|
break;
|
||||||
case "UseEstateSun":
|
case "UseEstateSun":
|
||||||
settings.UseEstateSun = bool.Parse(xtr.ReadElementContentAsString());
|
settings.UseEstateSun = bool.Parse(xtr.ReadElementContentAsString());
|
||||||
|
|
|
@ -503,7 +503,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
userProfile.HomeLocationX = (float)Convert.ToDecimal((string)requestData["home_pos_x"]);
|
userProfile.HomeLocationX = (float)Convert.ToDecimal((string)requestData["home_pos_x"], Culture.NumberFormatInfo);
|
||||||
}
|
}
|
||||||
catch (InvalidCastException)
|
catch (InvalidCastException)
|
||||||
{
|
{
|
||||||
|
@ -514,7 +514,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
userProfile.HomeLocationY = (float)Convert.ToDecimal((string)requestData["home_pos_y"]);
|
userProfile.HomeLocationY = (float)Convert.ToDecimal((string)requestData["home_pos_y"], Culture.NumberFormatInfo);
|
||||||
}
|
}
|
||||||
catch (InvalidCastException)
|
catch (InvalidCastException)
|
||||||
{
|
{
|
||||||
|
@ -525,7 +525,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
userProfile.HomeLocationZ = (float)Convert.ToDecimal((string)requestData["home_pos_z"]);
|
userProfile.HomeLocationZ = (float)Convert.ToDecimal((string)requestData["home_pos_z"], Culture.NumberFormatInfo);
|
||||||
}
|
}
|
||||||
catch (InvalidCastException)
|
catch (InvalidCastException)
|
||||||
{
|
{
|
||||||
|
@ -536,7 +536,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
userProfile.HomeLookAtX = (float)Convert.ToDecimal((string)requestData["home_look_x"]);
|
userProfile.HomeLookAtX = (float)Convert.ToDecimal((string)requestData["home_look_x"], Culture.NumberFormatInfo);
|
||||||
}
|
}
|
||||||
catch (InvalidCastException)
|
catch (InvalidCastException)
|
||||||
{
|
{
|
||||||
|
@ -547,7 +547,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
userProfile.HomeLookAtY = (float)Convert.ToDecimal((string)requestData["home_look_y"]);
|
userProfile.HomeLookAtY = (float)Convert.ToDecimal((string)requestData["home_look_y"], Culture.NumberFormatInfo);
|
||||||
}
|
}
|
||||||
catch (InvalidCastException)
|
catch (InvalidCastException)
|
||||||
{
|
{
|
||||||
|
@ -558,7 +558,7 @@ namespace OpenSim.Grid.UserServer.Modules
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"]);
|
userProfile.HomeLookAtZ = (float)Convert.ToDecimal((string)requestData["home_look_z"], Culture.NumberFormatInfo);
|
||||||
}
|
}
|
||||||
catch (InvalidCastException)
|
catch (InvalidCastException)
|
||||||
{
|
{
|
||||||
|
@ -634,13 +634,13 @@ namespace OpenSim.Grid.UserServer.Modules
|
||||||
UUID RegionID = new UUID((string)requestData["region_uuid"]);
|
UUID RegionID = new UUID((string)requestData["region_uuid"]);
|
||||||
ulong regionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]);
|
ulong regionhandle = (ulong)Convert.ToInt64((string)requestData["region_handle"]);
|
||||||
Vector3 position = new Vector3(
|
Vector3 position = new Vector3(
|
||||||
(float)Convert.ToDecimal((string)requestData["region_pos_x"]),
|
(float)Convert.ToDecimal((string)requestData["region_pos_x"], Culture.NumberFormatInfo),
|
||||||
(float)Convert.ToDecimal((string)requestData["region_pos_y"]),
|
(float)Convert.ToDecimal((string)requestData["region_pos_y"], Culture.NumberFormatInfo),
|
||||||
(float)Convert.ToDecimal((string)requestData["region_pos_z"]));
|
(float)Convert.ToDecimal((string)requestData["region_pos_z"], Culture.NumberFormatInfo));
|
||||||
Vector3 lookat = new Vector3(
|
Vector3 lookat = new Vector3(
|
||||||
(float)Convert.ToDecimal((string)requestData["lookat_x"]),
|
(float)Convert.ToDecimal((string)requestData["lookat_x"], Culture.NumberFormatInfo),
|
||||||
(float)Convert.ToDecimal((string)requestData["lookat_y"]),
|
(float)Convert.ToDecimal((string)requestData["lookat_y"], Culture.NumberFormatInfo),
|
||||||
(float)Convert.ToDecimal((string)requestData["lookat_z"]));
|
(float)Convert.ToDecimal((string)requestData["lookat_z"], Culture.NumberFormatInfo));
|
||||||
|
|
||||||
handlerLogOffUser = OnLogOffUser;
|
handlerLogOffUser = OnLogOffUser;
|
||||||
if (handlerLogOffUser != null)
|
if (handlerLogOffUser != null)
|
||||||
|
|
|
@ -1183,14 +1183,14 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
if (cmdparams.Length > 4)
|
if (cmdparams.Length > 4)
|
||||||
{
|
{
|
||||||
loadOffset.X = (float) Convert.ToDecimal(cmdparams[4]);
|
loadOffset.X = (float)Convert.ToDecimal(cmdparams[4], Culture.NumberFormatInfo);
|
||||||
if (cmdparams.Length > 5)
|
if (cmdparams.Length > 5)
|
||||||
{
|
{
|
||||||
loadOffset.Y = (float) Convert.ToDecimal(cmdparams[5]);
|
loadOffset.Y = (float)Convert.ToDecimal(cmdparams[5], Culture.NumberFormatInfo);
|
||||||
}
|
}
|
||||||
if (cmdparams.Length > 6)
|
if (cmdparams.Length > 6)
|
||||||
{
|
{
|
||||||
loadOffset.Z = (float) Convert.ToDecimal(cmdparams[6]);
|
loadOffset.Z = (float)Convert.ToDecimal(cmdparams[6], Culture.NumberFormatInfo);
|
||||||
}
|
}
|
||||||
MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z));
|
MainConsole.Instance.Output(String.Format("loadOffsets <X,Y,Z> = <{0},{1},{2}>",loadOffset.X,loadOffset.Y,loadOffset.Z));
|
||||||
}
|
}
|
||||||
|
|
|
@ -8307,8 +8307,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter),
|
OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter),
|
||||||
convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter),
|
convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter),
|
||||||
Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter))),
|
Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter), Culture.NumberFormatInfo)),
|
||||||
(float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)),
|
(float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo),
|
||||||
Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)),
|
Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)),
|
||||||
convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter));
|
convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter));
|
||||||
}
|
}
|
||||||
|
@ -8356,8 +8356,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (splitField.Length == 3)
|
if (splitField.Length == 3)
|
||||||
{
|
{
|
||||||
Int16 corner = Convert.ToInt16(splitField[0]);
|
Int16 corner = Convert.ToInt16(splitField[0]);
|
||||||
float lowValue = (float)Convert.ToDecimal(splitField[1]);
|
float lowValue = (float)Convert.ToDecimal(splitField[1], Culture.NumberFormatInfo);
|
||||||
float highValue = (float)Convert.ToDecimal(splitField[2]);
|
float highValue = (float)Convert.ToDecimal(splitField[2], Culture.NumberFormatInfo);
|
||||||
|
|
||||||
OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue);
|
OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue);
|
||||||
}
|
}
|
||||||
|
@ -8380,19 +8380,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter);
|
string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter);
|
||||||
if (!tmp.Contains(".")) tmp += ".00";
|
if (!tmp.Contains(".")) tmp += ".00";
|
||||||
float WaterHeight = (float)Convert.ToDecimal(tmp);
|
float WaterHeight = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo);
|
||||||
tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter);
|
tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter);
|
||||||
if (!tmp.Contains(".")) tmp += ".00";
|
if (!tmp.Contains(".")) tmp += ".00";
|
||||||
float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp);
|
float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo);
|
||||||
tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter);
|
tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter);
|
||||||
if (!tmp.Contains(".")) tmp += ".00";
|
if (!tmp.Contains(".")) tmp += ".00";
|
||||||
float TerrainLowerLimit = (float)Convert.ToDecimal(tmp);
|
float TerrainLowerLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo);
|
||||||
bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter);
|
bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter);
|
||||||
bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter);
|
bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter);
|
||||||
float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter));
|
float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo);
|
||||||
bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter);
|
bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter);
|
||||||
bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter);
|
bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter);
|
||||||
float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter));
|
float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter), Culture.NumberFormatInfo);
|
||||||
|
|
||||||
OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour);
|
OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour);
|
||||||
|
|
||||||
|
@ -13924,8 +13924,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter),
|
OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter),
|
||||||
convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter),
|
convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter),
|
||||||
Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter))),
|
Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter), Culture.NumberFormatInfo)),
|
||||||
(float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)),
|
(float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo),
|
||||||
Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)),
|
Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)),
|
||||||
convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter));
|
convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter));
|
||||||
}
|
}
|
||||||
|
@ -13973,8 +13973,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (splitField.Length == 3)
|
if (splitField.Length == 3)
|
||||||
{
|
{
|
||||||
Int16 corner = Convert.ToInt16(splitField[0]);
|
Int16 corner = Convert.ToInt16(splitField[0]);
|
||||||
float lowValue = (float)Convert.ToDecimal(splitField[1]);
|
float lowValue = (float)Convert.ToDecimal(splitField[1], Culture.NumberFormatInfo);
|
||||||
float highValue = (float)Convert.ToDecimal(splitField[2]);
|
float highValue = (float)Convert.ToDecimal(splitField[2], Culture.NumberFormatInfo);
|
||||||
|
|
||||||
OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue);
|
OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue);
|
||||||
}
|
}
|
||||||
|
@ -13997,19 +13997,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter);
|
string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter);
|
||||||
if (!tmp.Contains(".")) tmp += ".00";
|
if (!tmp.Contains(".")) tmp += ".00";
|
||||||
float WaterHeight = (float)Convert.ToDecimal(tmp);
|
float WaterHeight = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo);
|
||||||
tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter);
|
tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter);
|
||||||
if (!tmp.Contains(".")) tmp += ".00";
|
if (!tmp.Contains(".")) tmp += ".00";
|
||||||
float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp);
|
float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo);
|
||||||
tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter);
|
tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter);
|
||||||
if (!tmp.Contains(".")) tmp += ".00";
|
if (!tmp.Contains(".")) tmp += ".00";
|
||||||
float TerrainLowerLimit = (float)Convert.ToDecimal(tmp);
|
float TerrainLowerLimit = (float)Convert.ToDecimal(tmp, Culture.NumberFormatInfo);
|
||||||
bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter);
|
bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter);
|
||||||
bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter);
|
bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter);
|
||||||
float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter));
|
float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter), Culture.NumberFormatInfo);
|
||||||
bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter);
|
bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter);
|
||||||
bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter);
|
bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter);
|
||||||
float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter));
|
float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter), Culture.NumberFormatInfo);
|
||||||
|
|
||||||
OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour);
|
OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour);
|
||||||
|
|
||||||
|
|
|
@ -673,13 +673,13 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
else
|
else
|
||||||
userData.HomeRegionID = UUID.Zero;
|
userData.HomeRegionID = UUID.Zero;
|
||||||
userData.HomeLocation =
|
userData.HomeLocation =
|
||||||
new Vector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]),
|
new Vector3((float)Convert.ToDecimal((string)data["home_coordinates_x"], Culture.NumberFormatInfo),
|
||||||
(float)Convert.ToDecimal((string)data["home_coordinates_y"]),
|
(float)Convert.ToDecimal((string)data["home_coordinates_y"], Culture.NumberFormatInfo),
|
||||||
(float)Convert.ToDecimal((string)data["home_coordinates_z"]));
|
(float)Convert.ToDecimal((string)data["home_coordinates_z"], Culture.NumberFormatInfo));
|
||||||
userData.HomeLookAt =
|
userData.HomeLookAt =
|
||||||
new Vector3((float)Convert.ToDecimal((string)data["home_look_x"]),
|
new Vector3((float)Convert.ToDecimal((string)data["home_look_x"], Culture.NumberFormatInfo),
|
||||||
(float)Convert.ToDecimal((string)data["home_look_y"]),
|
(float)Convert.ToDecimal((string)data["home_look_y"], Culture.NumberFormatInfo),
|
||||||
(float)Convert.ToDecimal((string)data["home_look_z"]));
|
(float)Convert.ToDecimal((string)data["home_look_z"], Culture.NumberFormatInfo));
|
||||||
if (data.Contains("user_flags"))
|
if (data.Contains("user_flags"))
|
||||||
userData.UserFlags = Convert.ToInt32((string)data["user_flags"]);
|
userData.UserFlags = Convert.ToInt32((string)data["user_flags"]);
|
||||||
if (data.Contains("god_level"))
|
if (data.Contains("god_level"))
|
||||||
|
|
|
@ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander
|
||||||
m_args[i].ArgumentValue = Int32.Parse(arg.ToString());
|
m_args[i].ArgumentValue = Int32.Parse(arg.ToString());
|
||||||
break;
|
break;
|
||||||
case "Double":
|
case "Double":
|
||||||
m_args[i].ArgumentValue = Double.Parse(arg.ToString());
|
m_args[i].ArgumentValue = Double.Parse(arg.ToString(), OpenSim.Framework.Culture.NumberFormatInfo);
|
||||||
break;
|
break;
|
||||||
case "Boolean":
|
case "Boolean":
|
||||||
m_args[i].ArgumentValue = Boolean.Parse(arg.ToString());
|
m_args[i].ArgumentValue = Boolean.Parse(arg.ToString());
|
||||||
|
|
|
@ -974,8 +974,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
if (y == -1 || m_scene.RegionInfo.RegionLocY == y)
|
if (y == -1 || m_scene.RegionInfo.RegionLocY == y)
|
||||||
{
|
{
|
||||||
int corner = int.Parse(num);
|
int corner = int.Parse(num);
|
||||||
float lowValue = float.Parse(min);
|
float lowValue = float.Parse(min, Culture.NumberFormatInfo);
|
||||||
float highValue = float.Parse(max);
|
float highValue = float.Parse(max, Culture.NumberFormatInfo);
|
||||||
|
|
||||||
m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName +
|
m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName +
|
||||||
string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue));
|
string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue));
|
||||||
|
|
|
@ -104,9 +104,9 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
|
||||||
this.m_name = field[1].Trim();
|
this.m_name = field[1].Trim();
|
||||||
this.m_frozen = (copsedef[0] == 'F');
|
this.m_frozen = (copsedef[0] == 'F');
|
||||||
this.m_tree_quantity = int.Parse(field[2]);
|
this.m_tree_quantity = int.Parse(field[2]);
|
||||||
this.m_treeline_high = float.Parse(field[3]);
|
this.m_treeline_high = float.Parse(field[3], Culture.NumberFormatInfo);
|
||||||
this.m_treeline_low = float.Parse(field[4]);
|
this.m_treeline_low = float.Parse(field[4], Culture.NumberFormatInfo);
|
||||||
this.m_range = double.Parse(field[5]);
|
this.m_range = double.Parse(field[5], Culture.NumberFormatInfo);
|
||||||
this.m_tree_type = (Tree) Enum.Parse(typeof(Tree),field[6]);
|
this.m_tree_type = (Tree) Enum.Parse(typeof(Tree),field[6]);
|
||||||
this.m_seed_point = Vector3.Parse(field[7]);
|
this.m_seed_point = Vector3.Parse(field[7]);
|
||||||
this.m_initial_scale = Vector3.Parse(field[8]);
|
this.m_initial_scale = Vector3.Parse(field[8]);
|
||||||
|
|
|
@ -389,7 +389,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||||
break;
|
break;
|
||||||
case "MinEventDelay":
|
case "MinEventDelay":
|
||||||
double minEventDelay = 0.0;
|
double minEventDelay = 0.0;
|
||||||
double.TryParse(part.InnerText, out minEventDelay);
|
double.TryParse(part.InnerText, NumberStyles.Float, Culture.NumberFormatInfo, out minEventDelay);
|
||||||
instance.MinEventDelay = minEventDelay;
|
instance.MinEventDelay = minEventDelay;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,9 +72,9 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool res;
|
bool res;
|
||||||
res = Double.TryParse(tmps[0], out x);
|
res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x);
|
||||||
res = res & Double.TryParse(tmps[1], out y);
|
res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y);
|
||||||
res = res & Double.TryParse(tmps[2], out z);
|
res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -309,10 +309,10 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool res;
|
bool res;
|
||||||
res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.FormatProvider, out x);
|
res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x);
|
||||||
res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.FormatProvider, out y);
|
res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y);
|
||||||
res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.FormatProvider, out z);
|
res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z);
|
||||||
res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.FormatProvider, out s);
|
res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.NumberFormatInfo, out s);
|
||||||
if (x == 0 && y == 0 && z == 0 && s == 0)
|
if (x == 0 && y == 0 && z == 0 && s == 0)
|
||||||
s = 1;
|
s = 1;
|
||||||
}
|
}
|
||||||
|
@ -1015,7 +1015,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
double entry;
|
double entry;
|
||||||
for (int i = 0; i < Data.Length; i++)
|
for (int i = 0; i < Data.Length; i++)
|
||||||
{
|
{
|
||||||
if (double.TryParse(Data[i].ToString(), out entry))
|
if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry))
|
||||||
{
|
{
|
||||||
if (entry < minimum) minimum = entry;
|
if (entry < minimum) minimum = entry;
|
||||||
}
|
}
|
||||||
|
@ -1029,7 +1029,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
double entry;
|
double entry;
|
||||||
for (int i = 0; i < Data.Length; i++)
|
for (int i = 0; i < Data.Length; i++)
|
||||||
{
|
{
|
||||||
if (double.TryParse(Data[i].ToString(), out entry))
|
if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry))
|
||||||
{
|
{
|
||||||
if (entry > maximum) maximum = entry;
|
if (entry > maximum) maximum = entry;
|
||||||
}
|
}
|
||||||
|
@ -1048,7 +1048,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
double entry;
|
double entry;
|
||||||
for (int i = 0; i < Data.Length; i++)
|
for (int i = 0; i < Data.Length; i++)
|
||||||
{
|
{
|
||||||
if (double.TryParse(Data[i].ToString(), out entry))
|
if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry))
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
@ -1062,7 +1062,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
double entry;
|
double entry;
|
||||||
for (int i = 0; i < src.Data.Length - 1; i++)
|
for (int i = 0; i < src.Data.Length - 1; i++)
|
||||||
{
|
{
|
||||||
if (double.TryParse(src.Data[i].ToString(), out entry))
|
if (double.TryParse(src.Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry))
|
||||||
{
|
{
|
||||||
ret.Add(entry);
|
ret.Add(entry);
|
||||||
}
|
}
|
||||||
|
@ -1076,7 +1076,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
double entry;
|
double entry;
|
||||||
for (int i = 0; i < Data.Length; i++)
|
for (int i = 0; i < Data.Length; i++)
|
||||||
{
|
{
|
||||||
if (double.TryParse(Data[i].ToString(), out entry))
|
if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry))
|
||||||
{
|
{
|
||||||
sum = sum + entry;
|
sum = sum + entry;
|
||||||
}
|
}
|
||||||
|
@ -1090,7 +1090,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
double entry;
|
double entry;
|
||||||
for (int i = 0; i < Data.Length; i++)
|
for (int i = 0; i < Data.Length; i++)
|
||||||
{
|
{
|
||||||
if (double.TryParse(Data[i].ToString(), out entry))
|
if (double.TryParse(Data[i].ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out entry))
|
||||||
{
|
{
|
||||||
sum = sum + Math.Pow(entry, 2);
|
sum = sum + Math.Pow(entry, 2);
|
||||||
}
|
}
|
||||||
|
@ -1213,11 +1213,11 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
{
|
{
|
||||||
double a;
|
double a;
|
||||||
double b;
|
double b;
|
||||||
if (!double.TryParse(x.ToString(), out a))
|
if (!double.TryParse(x.ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out a))
|
||||||
{
|
{
|
||||||
a = 0.0;
|
a = 0.0;
|
||||||
}
|
}
|
||||||
if (!double.TryParse(y.ToString(), out b))
|
if (!double.TryParse(y.ToString(), NumberStyles.Float, Culture.NumberFormatInfo, out b))
|
||||||
{
|
{
|
||||||
b = 0.0;
|
b = 0.0;
|
||||||
}
|
}
|
||||||
|
@ -1857,7 +1857,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||||
else
|
else
|
||||||
if (v.EndsWith("."))
|
if (v.EndsWith("."))
|
||||||
v = v + "0";
|
v = v + "0";
|
||||||
this.value = double.Parse(v, System.Globalization.NumberStyles.Float, Culture.FormatProvider);
|
this.value = double.Parse(v, System.Globalization.NumberStyles.Float, Culture.NumberFormatInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -132,9 +132,9 @@ namespace OpenSim.Server.Handlers.Grid
|
||||||
userData.SurName = (string)requestData["lastname"];
|
userData.SurName = (string)requestData["lastname"];
|
||||||
userData.ID = new UUID((string)requestData["agent_id"]);
|
userData.ID = new UUID((string)requestData["agent_id"]);
|
||||||
UUID sessionID = new UUID((string)requestData["session_id"]);
|
UUID sessionID = new UUID((string)requestData["session_id"]);
|
||||||
userData.HomeLocation = new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"]),
|
userData.HomeLocation = new Vector3((float)Convert.ToDecimal((string)requestData["startpos_x"], Culture.NumberFormatInfo),
|
||||||
(float)Convert.ToDecimal((string)requestData["startpos_y"]),
|
(float)Convert.ToDecimal((string)requestData["startpos_y"], Culture.NumberFormatInfo),
|
||||||
(float)Convert.ToDecimal((string)requestData["startpos_z"]));
|
(float)Convert.ToDecimal((string)requestData["startpos_z"], Culture.NumberFormatInfo));
|
||||||
|
|
||||||
userData.UserServerURI = (string)requestData["userserver_id"];
|
userData.UserServerURI = (string)requestData["userserver_id"];
|
||||||
userData.UserAssetURI = (string)requestData["assetserver_id"];
|
userData.UserAssetURI = (string)requestData["assetserver_id"];
|
||||||
|
|
Loading…
Reference in New Issue