From 459323a931f6d4e23d813ef6414ea8e4d511dd76 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 21 Apr 2010 19:44:19 +0100 Subject: [PATCH 1/5] 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(+) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 2296379da7..4d7ead6553 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); From c9da66728a6f6bc1304b3f0ec70bd06c32d064c2 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 22 Apr 2010 07:25:32 -0700 Subject: [PATCH 2/5] Renamed OpenSim.Server.exe to Robust.exe and corresponding .ini's and config. --- bin/{OpenSim.Server.HG.ini.example => Robust.HG.ini.example} | 0 bin/{OpenSim.Server.exe.config => Robust.exe.config} | 0 bin/{OpenSim.Server.ini.example => Robust.ini.example} | 0 prebuild.xml | 2 +- 4 files changed, 1 insertion(+), 1 deletion(-) rename bin/{OpenSim.Server.HG.ini.example => Robust.HG.ini.example} (100%) rename bin/{OpenSim.Server.exe.config => Robust.exe.config} (100%) rename bin/{OpenSim.Server.ini.example => Robust.ini.example} (100%) diff --git a/bin/OpenSim.Server.HG.ini.example b/bin/Robust.HG.ini.example similarity index 100% rename from bin/OpenSim.Server.HG.ini.example rename to bin/Robust.HG.ini.example diff --git a/bin/OpenSim.Server.exe.config b/bin/Robust.exe.config similarity index 100% rename from bin/OpenSim.Server.exe.config rename to bin/Robust.exe.config diff --git a/bin/OpenSim.Server.ini.example b/bin/Robust.ini.example similarity index 100% rename from bin/OpenSim.Server.ini.example rename to bin/Robust.ini.example diff --git a/prebuild.xml b/prebuild.xml index 5cc742c45a..47f0347d3d 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1299,7 +1299,7 @@ - + ../../bin/ From e33209fe5bf2a520d9fcb7fb309d66c8d0000aab Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 22 Apr 2010 08:47:47 -0700 Subject: [PATCH 3/5] Sanitized parsing of floats (x, y, z location) for Culture. --- OpenSim/Services/LLLoginService/LLLoginService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 7b25274b47..c333b5cec0 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) From ebcc9874d4d285ab2b45d62cc4fe89e9830111b7 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 22 Apr 2010 17:45:03 +0100 Subject: [PATCH 4/5] 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(+) diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index 4622e23ded..68e25ef0aa 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) From 67990ea7e4d768b6574249082224978c22da0af4 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Thu, 22 Apr 2010 18:55:31 -0700 Subject: [PATCH 5/5] * Better error logging for failed SimianGrid web service calls --- OpenSim/Framework/WebUtil.cs | 11 ++++++++--- .../SimianGrid/SimianAssetServiceConnector.cs | 13 +++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 2843e202be..94862a6372 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 79e49a11b9..3fdee9c8b4 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; } } }