diff options
author | John Hurliman | 2010-09-03 13:36:59 -0700 |
---|---|---|
committer | John Hurliman | 2010-09-03 13:36:59 -0700 |
commit | aadbffffb1ff61ed24f2e2ecd78d11b8d0851d34 (patch) | |
tree | 30af81e23062b91bd333af5484443ad703f118e5 | |
parent | * Removed Simian.IsSimianEnabled() call, changed the SimianGrid connectors to... (diff) | |
parent | minor: remove mono compiler warnings (diff) | |
download | opensim-SC_OLD-aadbffffb1ff61ed24f2e2ecd78d11b8d0851d34.zip opensim-SC_OLD-aadbffffb1ff61ed24f2e2ecd78d11b8d0851d34.tar.gz opensim-SC_OLD-aadbffffb1ff61ed24f2e2ecd78d11b8d0851d34.tar.bz2 opensim-SC_OLD-aadbffffb1ff61ed24f2e2ecd78d11b8d0851d34.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
7 files changed, 43 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs index 8343091..47e34dc 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs | |||
@@ -41,7 +41,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
41 | /// </summary> | 41 | /// </summary> |
42 | public static class InventoryArchiveUtils | 42 | public static class InventoryArchiveUtils |
43 | { | 43 | { |
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | // Character used for escaping the path delimter ("\/") and itself ("\\") in human escaped strings | 46 | // Character used for escaping the path delimter ("\/") and itself ("\\") in human escaped strings |
47 | public static readonly char ESCAPE_CHARACTER = '\\'; | 47 | public static readonly char ESCAPE_CHARACTER = '\\'; |
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs index 6294935..b62df18 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs | |||
@@ -54,12 +54,12 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
54 | }; | 54 | }; |
55 | } | 55 | } |
56 | 56 | ||
57 | private static byte[] uintToByteArray(uint uIntValue) | 57 | // private static byte[] uintToByteArray(uint uIntValue) |
58 | { | 58 | // { |
59 | byte[] result = new byte[4]; | 59 | // byte[] result = new byte[4]; |
60 | Utils.UIntToBytesBig(uIntValue, result, 0); | 60 | // Utils.UIntToBytesBig(uIntValue, result, 0); |
61 | return result; | 61 | // return result; |
62 | } | 62 | // } |
63 | 63 | ||
64 | public static OSD buildEvent(string eventName, OSD eventBody) | 64 | public static OSD buildEvent(string eventName, OSD eventBody) |
65 | { | 65 | { |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index c673b31..125a397 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
132 | } | 132 | } |
133 | 133 | ||
134 | // DO NOT OVERRIDE THE BASE METHOD | 134 | // DO NOT OVERRIDE THE BASE METHOD |
135 | public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, | 135 | public new virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, |
136 | SceneObjectGroup objectGroup, IClientAPI remoteClient) | 136 | SceneObjectGroup objectGroup, IClientAPI remoteClient) |
137 | { | 137 | { |
138 | UUID assetID = base.DeleteToInventory(action, folderID, new List<SceneObjectGroup>() {objectGroup}, remoteClient); | 138 | UUID assetID = base.DeleteToInventory(action, folderID, new List<SceneObjectGroup>() {objectGroup}, remoteClient); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index d7767bd..ca089a1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -252,7 +252,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
252 | 252 | ||
253 | if (!m_part.ParentGroup.Scene.RegionInfo.RegionSettings.DisableScripts) | 253 | if (!m_part.ParentGroup.Scene.RegionInfo.RegionSettings.DisableScripts) |
254 | { | 254 | { |
255 | if (stateSource == 1 && // Prim crossing | 255 | if (stateSource == 2 && // Prim crossing |
256 | m_part.ParentGroup.Scene.m_trustBinaries) | 256 | m_part.ParentGroup.Scene.m_trustBinaries) |
257 | { | 257 | { |
258 | lock (m_items) | 258 | lock (m_items) |
@@ -1095,4 +1095,4 @@ namespace OpenSim.Region.Framework.Scenes | |||
1095 | } | 1095 | } |
1096 | } | 1096 | } |
1097 | } | 1097 | } |
1098 | } \ No newline at end of file | 1098 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs index 358ce22..dfc9aa3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs | |||
@@ -134,5 +134,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
134 | 134 | ||
135 | #endregion | 135 | #endregion |
136 | 136 | ||
137 | [Test] | ||
138 | // llRot2Euler test. | ||
139 | public void TestllRot2Euler() | ||
140 | { | ||
141 | // 180, 90 and zero degree rotations. | ||
142 | CheckllRot2Euler(new LSL_Types.Quaternion(1.0f, 0.0f, 0.0f, 0.0f), new LSL_Types.Vector3(Math.PI, 0.0f, 0.0f)); | ||
143 | CheckllRot2Euler(new LSL_Types.Quaternion(0.0f, 1.0f, 0.0f, 0.0f), new LSL_Types.Vector3(Math.PI, 0.0f, Math.PI)); | ||
144 | CheckllRot2Euler(new LSL_Types.Quaternion(0.0f, 0.0f, 1.0f, 0.0f), new LSL_Types.Vector3(0.0f, 0.0f, Math.PI)); | ||
145 | CheckllRot2Euler(new LSL_Types.Quaternion(0.0f, 0.0f, 0.0f, 1.0f), new LSL_Types.Vector3(0.0f, 0.0f, 0.0f)); | ||
146 | CheckllRot2Euler(new LSL_Types.Quaternion(-0.5f, -0.5f, 0.5f, 0.5f), new LSL_Types.Vector3(0, -Math.PI / 2.0f, Math.PI / 2.0f)); | ||
147 | CheckllRot2Euler(new LSL_Types.Quaternion(-0.707107f, 0.0f, 0.0f, -0.707107f), new LSL_Types.Vector3(Math.PI / 2.0f, 0.0f, 0.0f)); | ||
148 | // A couple of messy rotations. | ||
149 | CheckllRot2Euler(new LSL_Types.Quaternion(1.0f, 5.651f, -3.1f, 67.023f), new LSL_Types.Vector3(0.037818f, 0.166447f, -0.095595f)); | ||
150 | CheckllRot2Euler(new LSL_Types.Quaternion(0.719188f, -0.408934f, -0.363998f, -0.427841f), new LSL_Types.Vector3(-1.954769f, -0.174533f, 1.151917f)); | ||
151 | } | ||
152 | |||
153 | private void CheckllRot2Euler(LSL_Types.Quaternion rot, LSL_Types.Vector3 eulerCheck) | ||
154 | { | ||
155 | // Call LSL function to convert quaternion rotaion to euler radians. | ||
156 | LSL_Types.Vector3 eulerCalc = m_lslApi.llRot2Euler(rot); | ||
157 | // Check upper and lower bounds of x, y and z. | ||
158 | // This type of check is performed as opposed to comparing for equal numbers, in order to allow slight | ||
159 | // differences in accuracy. | ||
160 | Assert.Greater(eulerCalc.x, eulerCheck.x - ANGLE_ACCURACY_IN_RADIANS, "TestllRot2Euler X lower bounds check fail"); | ||
161 | Assert.Less(eulerCalc.x, eulerCheck.x + ANGLE_ACCURACY_IN_RADIANS, "TestllRot2Euler X upper bounds check fail"); | ||
162 | Assert.Greater(eulerCalc.y, eulerCheck.y - ANGLE_ACCURACY_IN_RADIANS, "TestllRot2Euler Y lower bounds check fail"); | ||
163 | Assert.Less(eulerCalc.y, eulerCheck.y + ANGLE_ACCURACY_IN_RADIANS, "TestllRot2Euler Y upper bounds check fail"); | ||
164 | Assert.Greater(eulerCalc.z, eulerCheck.z - ANGLE_ACCURACY_IN_RADIANS, "TestllRot2Euler Z lower bounds check fail"); | ||
165 | Assert.Less(eulerCalc.z, eulerCheck.z + ANGLE_ACCURACY_IN_RADIANS, "TestllRot2Euler Z upper bounds check fail"); | ||
166 | } | ||
137 | } | 167 | } |
138 | } | 168 | } |
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index 77e3b20..f5b5982 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | |||
@@ -86,7 +86,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
86 | paramList.Add(hash); | 86 | paramList.Add(hash); |
87 | 87 | ||
88 | XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); | 88 | XmlRpcRequest request = new XmlRpcRequest("link_region", paramList); |
89 | string uri = "http://" + ((info.ServerURI == string.Empty) ? info.ExternalEndPoint.Address + ":" + info.HttpPort + "/" : info.ServerURI); | 89 | string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/" ); |
90 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri); | 90 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri); |
91 | XmlRpcResponse response = null; | 91 | XmlRpcResponse response = null; |
92 | try | 92 | try |
@@ -188,7 +188,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
188 | paramList.Add(hash); | 188 | paramList.Add(hash); |
189 | 189 | ||
190 | XmlRpcRequest request = new XmlRpcRequest("get_region", paramList); | 190 | XmlRpcRequest request = new XmlRpcRequest("get_region", paramList); |
191 | string uri = "http://" + ((gatekeeper.ServerURI == string.Empty) ? gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/" : gatekeeper.ServerURI); | 191 | string uri = "http://" + ((gatekeeper.ServerURI != null && gatekeeper.ServerURI != string.Empty && !gatekeeper.ServerURI.StartsWith("http:")) ? gatekeeper.ServerURI : gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/"); |
192 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri); | 192 | m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri); |
193 | XmlRpcResponse response = null; | 193 | XmlRpcResponse response = null; |
194 | try | 194 | try |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index df818f5..a5f748f 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -107,7 +107,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
107 | string uri = string.Empty; | 107 | string uri = string.Empty; |
108 | 108 | ||
109 | // HACK -- Simian grid make it work!!! | 109 | // HACK -- Simian grid make it work!!! |
110 | if (destination.ServerURI != string.Empty) | 110 | if (destination.ServerURI != null && destination.ServerURI != string.Empty && !destination.ServerURI.StartsWith("http:")) |
111 | uri = "http://" + destination.ServerURI + AgentPath() + aCircuit.AgentID + "/"; | 111 | uri = "http://" + destination.ServerURI + AgentPath() + aCircuit.AgentID + "/"; |
112 | else | 112 | else |
113 | { | 113 | { |