From 459323a931f6d4e23d813ef6414ea8e4d511dd76 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 21 Apr 2010 19:44:19 +0100 Subject: Make the detection cone in attachments face in the direction of the avatar, not the relative rotation of the attachment towards the avatar. --- .../Shared/Api/Implementation/Plugins/SensorRepeat.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 2296379..4d7ead6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs @@ -302,6 +302,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins float dz; Quaternion q = SensePoint.RotationOffset; + if (SensePoint.ParentGroup.RootPart.IsAttachment) + { + // In attachments, the sensor cone always orients with the + // avatar rotation. This may include a nonzero elevation if + // in mouselook. + + ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.RootPart.AttachedAvatar); + q = avatar.Rotation; + } LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); -- cgit v1.1 From e33209fe5bf2a520d9fcb7fb309d66c8d0000aab Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 22 Apr 2010 08:47:47 -0700 Subject: Sanitized parsing of floats (x, y, z location) for Culture. --- OpenSim/Services/LLLoginService/LLLoginService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 7b25274..c333b5c 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -405,9 +405,9 @@ namespace OpenSim.Services.LLLoginService } else { - position = new Vector3(float.Parse(uriMatch.Groups["x"].Value), - float.Parse(uriMatch.Groups["y"].Value), - float.Parse(uriMatch.Groups["z"].Value)); + position = new Vector3(float.Parse(uriMatch.Groups["x"].Value, Culture.NumberFormatInfo), + float.Parse(uriMatch.Groups["y"].Value, Culture.NumberFormatInfo), + float.Parse(uriMatch.Groups["z"].Value, Culture.NumberFormatInfo)); string regionName = uriMatch.Groups["region"].ToString(); if (regionName != null) -- cgit v1.1 From ebcc9874d4d285ab2b45d62cc4fe89e9830111b7 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 22 Apr 2010 17:45:03 +0100 Subject: Insert a ROLLBACK command on migration step failure. This ensures that updating the Migrations table will not occur in a partial transaction, which would be auto-rolled-back later. --- OpenSim/Data/Migration.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index 4622e23..68e25ef 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs @@ -146,6 +146,8 @@ namespace OpenSim.Data { m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", cmd.CommandText); m_log.DebugFormat("[MIGRATIONS]: An error has occurred in the migration {0}.\n This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing.", e.Message); + cmd.CommandText = "ROLLBACK;"; + cmd.ExecuteNonQuery(); } if (version == 0) -- cgit v1.1 From 67990ea7e4d768b6574249082224978c22da0af4 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Thu, 22 Apr 2010 18:55:31 -0700 Subject: * Better error logging for failed SimianGrid web service calls --- OpenSim/Framework/WebUtil.cs | 11 ++++++++--- .../Connectors/SimianGrid/SimianAssetServiceConnector.cs | 13 +++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 2843e20..94862a6 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -146,18 +146,23 @@ namespace OpenSim.Framework { using (Stream responseStream = response.GetResponseStream()) { + string responseStr = null; + try { - string responseStr = responseStream.GetStreamString(); + responseStr = responseStream.GetStreamString(); OSD responseOSD = OSDParser.Deserialize(responseStr); if (responseOSD.Type == OSDType.Map) return (OSDMap)responseOSD; else errorMessage = "Response format was invalid."; } - catch + catch (Exception ex) { - errorMessage = "Failed to parse the response."; + if (!String.IsNullOrEmpty(responseStr)) + errorMessage = "Failed to parse the response:\n" + responseStr; + else + errorMessage = "Failed to retrieve the response: " + ex.Message; } } } diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 79e49a1..3fdee9c 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs @@ -303,9 +303,11 @@ namespace OpenSim.Services.Connectors.SimianGrid HttpWebResponse response = MultipartForm.Post(request, postParameters); using (Stream responseStream = response.GetResponseStream()) { + string responseStr = null; + try { - string responseStr = responseStream.GetStreamString(); + responseStr = responseStream.GetStreamString(); OSD responseOSD = OSDParser.Deserialize(responseStr); if (responseOSD.Type == OSDType.Map) { @@ -317,12 +319,15 @@ namespace OpenSim.Services.Connectors.SimianGrid } else { - errorMessage = "Response format was invalid."; + errorMessage = "Response format was invalid:\n" + responseStr; } } - catch + catch (Exception ex) { - errorMessage = "Failed to parse the response."; + if (!String.IsNullOrEmpty(responseStr)) + errorMessage = "Failed to parse the response:\n" + responseStr; + else + errorMessage = "Failed to retrieve the response: " + ex.Message; } } } -- cgit v1.1