Merge branch 'master' into xassetservice

xassetservice
Justin Clark-Casey (justincc) 2012-03-02 23:30:19 +00:00
commit 7113b44bdd
4 changed files with 34 additions and 40 deletions

View File

@ -262,7 +262,7 @@ namespace OpenSim.Region.ClientStack.Linden
{ {
try try
{ {
m_log.Debug("[CAPS]: ScriptTaskInventory Request in region: " + m_regionName); // m_log.Debug("[CAPS]: ScriptTaskInventory Request in region: " + m_regionName);
//m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param); //m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param);
Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request)); Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));

View File

@ -4156,16 +4156,11 @@ namespace OpenSim.Region.Framework.Scenes
public bool PipeEventsForScript(uint localID) public bool PipeEventsForScript(uint localID)
{ {
SceneObjectPart part = GetSceneObjectPart(localID); SceneObjectPart part = GetSceneObjectPart(localID);
if (part != null) if (part != null)
{ {
// Changed so that child prims of attachments return ScriptDanger for their parent, so that
// their scripts will actually run.
// -- Leaf, Tue Aug 12 14:17:05 EDT 2008
SceneObjectPart parent = part.ParentGroup.RootPart; SceneObjectPart parent = part.ParentGroup.RootPart;
if (part.ParentGroup.IsAttachment) return ScriptDanger(parent, parent.GetWorldPosition());
return ScriptDanger(parent, parent.GetWorldPosition());
else
return ScriptDanger(part, part.GetWorldPosition());
} }
else else
{ {

View File

@ -341,8 +341,8 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary> /// <summary>
/// Position of agent's camera in world (region cordinates) /// Position of agent's camera in world (region cordinates)
/// </summary> /// </summary>
protected Vector3 m_lastCameraPosition; protected Vector3 m_lastCameraPosition;
public Vector3 CameraPosition { get; set; } public Vector3 CameraPosition { get; set; }
public Quaternion CameraRotation public Quaternion CameraRotation
@ -352,9 +352,9 @@ namespace OpenSim.Region.Framework.Scenes
// Use these three vectors to figure out what the agent is looking at // Use these three vectors to figure out what the agent is looking at
// Convert it to a Matrix and/or Quaternion // Convert it to a Matrix and/or Quaternion
// //
public Vector3 CameraAtAxis { get; set; } public Vector3 CameraAtAxis { get; set; }
public Vector3 CameraLeftAxis { get; set; } public Vector3 CameraLeftAxis { get; set; }
public Vector3 CameraUpAxis { get; set; } public Vector3 CameraUpAxis { get; set; }
public Vector3 Lookat public Vector3 Lookat
@ -371,14 +371,14 @@ namespace OpenSim.Region.Framework.Scenes
} }
#endregion #endregion
public string Firstname { get; private set; } public string Firstname { get; private set; }
public string Lastname { get; private set; } public string Lastname { get; private set; }
public string Grouptitle { get; set; } public string Grouptitle { get; set; }
// Agent's Draw distance. // Agent's Draw distance.
public float DrawDistance { get; set; } public float DrawDistance { get; set; }
public bool AllowMovement { get; set; } public bool AllowMovement { get; set; }
private bool m_setAlwaysRun; private bool m_setAlwaysRun;
@ -404,8 +404,8 @@ namespace OpenSim.Region.Framework.Scenes
PhysicsActor.SetAlwaysRun = value; PhysicsActor.SetAlwaysRun = value;
} }
} }
} }
public byte State { get; set; } public byte State { get; set; }
private AgentManager.ControlFlags m_AgentControlFlags; private AgentManager.ControlFlags m_AgentControlFlags;
@ -414,15 +414,15 @@ namespace OpenSim.Region.Framework.Scenes
{ {
get { return (uint)m_AgentControlFlags; } get { return (uint)m_AgentControlFlags; }
set { m_AgentControlFlags = (AgentManager.ControlFlags)value; } set { m_AgentControlFlags = (AgentManager.ControlFlags)value; }
} }
public IClientAPI ControllingClient { get; set; } public IClientAPI ControllingClient { get; set; }
public IClientCore ClientView public IClientCore ClientView
{ {
get { return (IClientCore)ControllingClient; } get { return (IClientCore)ControllingClient; }
} }
public Vector3 ParentPosition { get; set; } public Vector3 ParentPosition { get; set; }
/// <summary> /// <summary>
@ -683,7 +683,7 @@ namespace OpenSim.Region.Framework.Scenes
IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type)
{ {
AttachmentsSyncLock = new Object(); AttachmentsSyncLock = new Object();
AllowMovement = true;
IsChildAgent = true; IsChildAgent = true;
m_sendCourseLocationsMethod = SendCoarseLocationsDefault; m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
Animator = new ScenePresenceAnimator(this); Animator = new ScenePresenceAnimator(this);
@ -761,17 +761,17 @@ namespace OpenSim.Region.Framework.Scenes
private Vector3[] GetWalkDirectionVectors() private Vector3[] GetWalkDirectionVectors()
{ {
Vector3[] vector = new Vector3[11]; Vector3[] vector = new Vector3[11];
vector[0] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD vector[0] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD
vector[1] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK vector[1] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK
vector[2] = Vector3.UnitY; //LEFT vector[2] = Vector3.UnitY; //LEFT
vector[3] = -Vector3.UnitY; //RIGHT vector[3] = -Vector3.UnitY; //RIGHT
vector[4] = new Vector3(CameraAtAxis.Z, 0f, CameraUpAxis.Z); //UP vector[4] = new Vector3(CameraAtAxis.Z, 0f, CameraUpAxis.Z); //UP
vector[5] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN vector[5] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN
vector[6] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD_NUDGE vector[6] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD_NUDGE
vector[7] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK_NUDGE vector[7] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK_NUDGE
vector[8] = Vector3.UnitY; //LEFT_NUDGE vector[8] = Vector3.UnitY; //LEFT_NUDGE
vector[9] = -Vector3.UnitY; //RIGHT_NUDGE vector[9] = -Vector3.UnitY; //RIGHT_NUDGE
vector[10] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN_NUDGE vector[10] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN_NUDGE
return vector; return vector;
} }
@ -1279,8 +1279,8 @@ namespace OpenSim.Region.Framework.Scenes
DrawDistance = Scene.DefaultDrawDistance; DrawDistance = Scene.DefaultDrawDistance;
// Check if Client has camera in 'follow cam' or 'build' mode. // Check if Client has camera in 'follow cam' or 'build' mode.
Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation);
m_followCamAuto = ((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f) m_followCamAuto = ((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f)
&& (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false; && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false;
@ -3013,7 +3013,7 @@ namespace OpenSim.Region.Framework.Scenes
cAgent.Velocity = m_velocity; cAgent.Velocity = m_velocity;
cAgent.Center = CameraPosition; cAgent.Center = CameraPosition;
cAgent.AtAxis = CameraAtAxis; cAgent.AtAxis = CameraAtAxis;
cAgent.LeftAxis = CameraLeftAxis; cAgent.LeftAxis = CameraLeftAxis;
cAgent.UpAxis = CameraUpAxis; cAgent.UpAxis = CameraUpAxis;
cAgent.Far = DrawDistance; cAgent.Far = DrawDistance;
@ -3099,7 +3099,7 @@ namespace OpenSim.Region.Framework.Scenes
m_velocity = cAgent.Velocity; m_velocity = cAgent.Velocity;
CameraPosition = cAgent.Center; CameraPosition = cAgent.Center;
CameraAtAxis = cAgent.AtAxis; CameraAtAxis = cAgent.AtAxis;
CameraLeftAxis = cAgent.LeftAxis; CameraLeftAxis = cAgent.LeftAxis;
CameraUpAxis = cAgent.UpAxis; CameraUpAxis = cAgent.UpAxis;
// When we get to the point of re-computing neighbors everytime this // When we get to the point of re-computing neighbors everytime this

View File

@ -65,8 +65,7 @@ namespace OpenSim.Region.Framework.Tests
// Create an object embedded inside the first // Create an object embedded inside the first
UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000");
TaskInventoryItem taskSceneObjectItem TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID);
= TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID);
TaskInventoryItem addedItem = sop1.Inventory.GetInventoryItem(taskSceneObjectItemId); TaskInventoryItem addedItem = sop1.Inventory.GetInventoryItem(taskSceneObjectItemId);
Assert.That(addedItem.ItemID, Is.EqualTo(taskSceneObjectItemId)); Assert.That(addedItem.ItemID, Is.EqualTo(taskSceneObjectItemId));