Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
aadbffffb1
|
@ -41,7 +41,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
|||
/// </summary>
|
||||
public static class InventoryArchiveUtils
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
// Character used for escaping the path delimter ("\/") and itself ("\\") in human escaped strings
|
||||
public static readonly char ESCAPE_CHARACTER = '\\';
|
||||
|
|
|
@ -54,12 +54,12 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
|
|||
};
|
||||
}
|
||||
|
||||
private static byte[] uintToByteArray(uint uIntValue)
|
||||
{
|
||||
byte[] result = new byte[4];
|
||||
Utils.UIntToBytesBig(uIntValue, result, 0);
|
||||
return result;
|
||||
}
|
||||
// private static byte[] uintToByteArray(uint uIntValue)
|
||||
// {
|
||||
// byte[] result = new byte[4];
|
||||
// Utils.UIntToBytesBig(uIntValue, result, 0);
|
||||
// return result;
|
||||
// }
|
||||
|
||||
public static OSD buildEvent(string eventName, OSD eventBody)
|
||||
{
|
||||
|
|
|
@ -132,7 +132,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
}
|
||||
|
||||
// DO NOT OVERRIDE THE BASE METHOD
|
||||
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
|
||||
public new virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
|
||||
SceneObjectGroup objectGroup, IClientAPI remoteClient)
|
||||
{
|
||||
UUID assetID = base.DeleteToInventory(action, folderID, new List<SceneObjectGroup>() {objectGroup}, remoteClient);
|
||||
|
|
|
@ -252,7 +252,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
if (!m_part.ParentGroup.Scene.RegionInfo.RegionSettings.DisableScripts)
|
||||
{
|
||||
if (stateSource == 1 && // Prim crossing
|
||||
if (stateSource == 2 && // Prim crossing
|
||||
m_part.ParentGroup.Scene.m_trustBinaries)
|
||||
{
|
||||
lock (m_items)
|
||||
|
@ -1095,4 +1095,4 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -134,5 +134,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
|||
|
||||
#endregion
|
||||
|
||||
[Test]
|
||||
// llRot2Euler test.
|
||||
public void TestllRot2Euler()
|
||||
{
|
||||
// 180, 90 and zero degree rotations.
|
||||
CheckllRot2Euler(new LSL_Types.Quaternion(1.0f, 0.0f, 0.0f, 0.0f), new LSL_Types.Vector3(Math.PI, 0.0f, 0.0f));
|
||||
CheckllRot2Euler(new LSL_Types.Quaternion(0.0f, 1.0f, 0.0f, 0.0f), new LSL_Types.Vector3(Math.PI, 0.0f, Math.PI));
|
||||
CheckllRot2Euler(new LSL_Types.Quaternion(0.0f, 0.0f, 1.0f, 0.0f), new LSL_Types.Vector3(0.0f, 0.0f, Math.PI));
|
||||
CheckllRot2Euler(new LSL_Types.Quaternion(0.0f, 0.0f, 0.0f, 1.0f), new LSL_Types.Vector3(0.0f, 0.0f, 0.0f));
|
||||
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));
|
||||
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));
|
||||
// A couple of messy rotations.
|
||||
CheckllRot2Euler(new LSL_Types.Quaternion(1.0f, 5.651f, -3.1f, 67.023f), new LSL_Types.Vector3(0.037818f, 0.166447f, -0.095595f));
|
||||
CheckllRot2Euler(new LSL_Types.Quaternion(0.719188f, -0.408934f, -0.363998f, -0.427841f), new LSL_Types.Vector3(-1.954769f, -0.174533f, 1.151917f));
|
||||
}
|
||||
|
||||
private void CheckllRot2Euler(LSL_Types.Quaternion rot, LSL_Types.Vector3 eulerCheck)
|
||||
{
|
||||
// Call LSL function to convert quaternion rotaion to euler radians.
|
||||
LSL_Types.Vector3 eulerCalc = m_lslApi.llRot2Euler(rot);
|
||||
// Check upper and lower bounds of x, y and z.
|
||||
// This type of check is performed as opposed to comparing for equal numbers, in order to allow slight
|
||||
// differences in accuracy.
|
||||
Assert.Greater(eulerCalc.x, eulerCheck.x - ANGLE_ACCURACY_IN_RADIANS, "TestllRot2Euler X lower bounds check fail");
|
||||
Assert.Less(eulerCalc.x, eulerCheck.x + ANGLE_ACCURACY_IN_RADIANS, "TestllRot2Euler X upper bounds check fail");
|
||||
Assert.Greater(eulerCalc.y, eulerCheck.y - ANGLE_ACCURACY_IN_RADIANS, "TestllRot2Euler Y lower bounds check fail");
|
||||
Assert.Less(eulerCalc.y, eulerCheck.y + ANGLE_ACCURACY_IN_RADIANS, "TestllRot2Euler Y upper bounds check fail");
|
||||
Assert.Greater(eulerCalc.z, eulerCheck.z - ANGLE_ACCURACY_IN_RADIANS, "TestllRot2Euler Z lower bounds check fail");
|
||||
Assert.Less(eulerCalc.z, eulerCheck.z + ANGLE_ACCURACY_IN_RADIANS, "TestllRot2Euler Z upper bounds check fail");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
|||
paramList.Add(hash);
|
||||
|
||||
XmlRpcRequest request = new XmlRpcRequest("link_region", paramList);
|
||||
string uri = "http://" + ((info.ServerURI == string.Empty) ? info.ExternalEndPoint.Address + ":" + info.HttpPort + "/" : info.ServerURI);
|
||||
string uri = "http://" + ((info.ServerURI != null && info.ServerURI != string.Empty && !info.ServerURI.StartsWith("http:")) ? info.ServerURI : info.ExternalEndPoint.Address + ":" + info.HttpPort + "/" );
|
||||
m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: Linking to " + uri);
|
||||
XmlRpcResponse response = null;
|
||||
try
|
||||
|
@ -188,7 +188,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
|
|||
paramList.Add(hash);
|
||||
|
||||
XmlRpcRequest request = new XmlRpcRequest("get_region", paramList);
|
||||
string uri = "http://" + ((gatekeeper.ServerURI == string.Empty) ? gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/" : gatekeeper.ServerURI);
|
||||
string uri = "http://" + ((gatekeeper.ServerURI != null && gatekeeper.ServerURI != string.Empty && !gatekeeper.ServerURI.StartsWith("http:")) ? gatekeeper.ServerURI : gatekeeper.ExternalEndPoint.Address + ":" + gatekeeper.HttpPort + "/");
|
||||
m_log.Debug("[GATEKEEPER SERVICE CONNECTOR]: contacting " + uri);
|
||||
XmlRpcResponse response = null;
|
||||
try
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace OpenSim.Services.Connectors.Simulation
|
|||
string uri = string.Empty;
|
||||
|
||||
// HACK -- Simian grid make it work!!!
|
||||
if (destination.ServerURI != string.Empty)
|
||||
if (destination.ServerURI != null && destination.ServerURI != string.Empty && !destination.ServerURI.StartsWith("http:"))
|
||||
uri = "http://" + destination.ServerURI + AgentPath() + aCircuit.AgentID + "/";
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue