aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs60
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs3
4 files changed, 34 insertions, 40 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index be699db..35cb575 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -262,7 +262,7 @@ namespace OpenSim.Region.ClientStack.Linden
262 { 262 {
263 try 263 try
264 { 264 {
265 m_log.Debug("[CAPS]: ScriptTaskInventory Request in region: " + m_regionName); 265// m_log.Debug("[CAPS]: ScriptTaskInventory Request in region: " + m_regionName);
266 //m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param); 266 //m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param);
267 267
268 Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request)); 268 Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 9bca654..a01b851 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4156,16 +4156,11 @@ namespace OpenSim.Region.Framework.Scenes
4156 public bool PipeEventsForScript(uint localID) 4156 public bool PipeEventsForScript(uint localID)
4157 { 4157 {
4158 SceneObjectPart part = GetSceneObjectPart(localID); 4158 SceneObjectPart part = GetSceneObjectPart(localID);
4159
4159 if (part != null) 4160 if (part != null)
4160 { 4161 {
4161 // Changed so that child prims of attachments return ScriptDanger for their parent, so that
4162 // their scripts will actually run.
4163 // -- Leaf, Tue Aug 12 14:17:05 EDT 2008
4164 SceneObjectPart parent = part.ParentGroup.RootPart; 4162 SceneObjectPart parent = part.ParentGroup.RootPart;
4165 if (part.ParentGroup.IsAttachment) 4163 return ScriptDanger(parent, parent.GetWorldPosition());
4166 return ScriptDanger(parent, parent.GetWorldPosition());
4167 else
4168 return ScriptDanger(part, part.GetWorldPosition());
4169 } 4164 }
4170 else 4165 else
4171 { 4166 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index e982bfe..ec6bb89 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -341,8 +341,8 @@ namespace OpenSim.Region.Framework.Scenes
341 /// <summary> 341 /// <summary>
342 /// Position of agent's camera in world (region cordinates) 342 /// Position of agent's camera in world (region cordinates)
343 /// </summary> 343 /// </summary>
344 protected Vector3 m_lastCameraPosition; 344 protected Vector3 m_lastCameraPosition;
345 345
346 public Vector3 CameraPosition { get; set; } 346 public Vector3 CameraPosition { get; set; }
347 347
348 public Quaternion CameraRotation 348 public Quaternion CameraRotation
@@ -352,9 +352,9 @@ namespace OpenSim.Region.Framework.Scenes
352 352
353 // Use these three vectors to figure out what the agent is looking at 353 // Use these three vectors to figure out what the agent is looking at
354 // Convert it to a Matrix and/or Quaternion 354 // Convert it to a Matrix and/or Quaternion
355 // 355 //
356 public Vector3 CameraAtAxis { get; set; } 356 public Vector3 CameraAtAxis { get; set; }
357 public Vector3 CameraLeftAxis { get; set; } 357 public Vector3 CameraLeftAxis { get; set; }
358 public Vector3 CameraUpAxis { get; set; } 358 public Vector3 CameraUpAxis { get; set; }
359 359
360 public Vector3 Lookat 360 public Vector3 Lookat
@@ -371,14 +371,14 @@ namespace OpenSim.Region.Framework.Scenes
371 } 371 }
372 #endregion 372 #endregion
373 373
374 public string Firstname { get; private set; } 374 public string Firstname { get; private set; }
375 public string Lastname { get; private set; } 375 public string Lastname { get; private set; }
376 376
377 public string Grouptitle { get; set; } 377 public string Grouptitle { get; set; }
378 378
379 // Agent's Draw distance. 379 // Agent's Draw distance.
380 public float DrawDistance { get; set; } 380 public float DrawDistance { get; set; }
381 381
382 public bool AllowMovement { get; set; } 382 public bool AllowMovement { get; set; }
383 383
384 private bool m_setAlwaysRun; 384 private bool m_setAlwaysRun;
@@ -404,8 +404,8 @@ namespace OpenSim.Region.Framework.Scenes
404 PhysicsActor.SetAlwaysRun = value; 404 PhysicsActor.SetAlwaysRun = value;
405 } 405 }
406 } 406 }
407 } 407 }
408 408
409 public byte State { get; set; } 409 public byte State { get; set; }
410 410
411 private AgentManager.ControlFlags m_AgentControlFlags; 411 private AgentManager.ControlFlags m_AgentControlFlags;
@@ -414,15 +414,15 @@ namespace OpenSim.Region.Framework.Scenes
414 { 414 {
415 get { return (uint)m_AgentControlFlags; } 415 get { return (uint)m_AgentControlFlags; }
416 set { m_AgentControlFlags = (AgentManager.ControlFlags)value; } 416 set { m_AgentControlFlags = (AgentManager.ControlFlags)value; }
417 } 417 }
418 418
419 public IClientAPI ControllingClient { get; set; } 419 public IClientAPI ControllingClient { get; set; }
420 420
421 public IClientCore ClientView 421 public IClientCore ClientView
422 { 422 {
423 get { return (IClientCore)ControllingClient; } 423 get { return (IClientCore)ControllingClient; }
424 } 424 }
425 425
426 public Vector3 ParentPosition { get; set; } 426 public Vector3 ParentPosition { get; set; }
427 427
428 /// <summary> 428 /// <summary>
@@ -683,7 +683,7 @@ namespace OpenSim.Region.Framework.Scenes
683 IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) 683 IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type)
684 { 684 {
685 AttachmentsSyncLock = new Object(); 685 AttachmentsSyncLock = new Object();
686 686 AllowMovement = true;
687 IsChildAgent = true; 687 IsChildAgent = true;
688 m_sendCourseLocationsMethod = SendCoarseLocationsDefault; 688 m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
689 Animator = new ScenePresenceAnimator(this); 689 Animator = new ScenePresenceAnimator(this);
@@ -761,17 +761,17 @@ namespace OpenSim.Region.Framework.Scenes
761 761
762 private Vector3[] GetWalkDirectionVectors() 762 private Vector3[] GetWalkDirectionVectors()
763 { 763 {
764 Vector3[] vector = new Vector3[11]; 764 Vector3[] vector = new Vector3[11];
765 vector[0] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD 765 vector[0] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD
766 vector[1] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK 766 vector[1] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK
767 vector[2] = Vector3.UnitY; //LEFT 767 vector[2] = Vector3.UnitY; //LEFT
768 vector[3] = -Vector3.UnitY; //RIGHT 768 vector[3] = -Vector3.UnitY; //RIGHT
769 vector[4] = new Vector3(CameraAtAxis.Z, 0f, CameraUpAxis.Z); //UP 769 vector[4] = new Vector3(CameraAtAxis.Z, 0f, CameraUpAxis.Z); //UP
770 vector[5] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN 770 vector[5] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN
771 vector[6] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD_NUDGE 771 vector[6] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD_NUDGE
772 vector[7] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK_NUDGE 772 vector[7] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK_NUDGE
773 vector[8] = Vector3.UnitY; //LEFT_NUDGE 773 vector[8] = Vector3.UnitY; //LEFT_NUDGE
774 vector[9] = -Vector3.UnitY; //RIGHT_NUDGE 774 vector[9] = -Vector3.UnitY; //RIGHT_NUDGE
775 vector[10] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN_NUDGE 775 vector[10] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN_NUDGE
776 return vector; 776 return vector;
777 } 777 }
@@ -1279,8 +1279,8 @@ namespace OpenSim.Region.Framework.Scenes
1279 DrawDistance = Scene.DefaultDrawDistance; 1279 DrawDistance = Scene.DefaultDrawDistance;
1280 1280
1281 // Check if Client has camera in 'follow cam' or 'build' mode. 1281 // Check if Client has camera in 'follow cam' or 'build' mode.
1282 Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); 1282 Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation);
1283 1283
1284 m_followCamAuto = ((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f) 1284 m_followCamAuto = ((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f)
1285 && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false; 1285 && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false;
1286 1286
@@ -3013,7 +3013,7 @@ namespace OpenSim.Region.Framework.Scenes
3013 cAgent.Velocity = m_velocity; 3013 cAgent.Velocity = m_velocity;
3014 cAgent.Center = CameraPosition; 3014 cAgent.Center = CameraPosition;
3015 cAgent.AtAxis = CameraAtAxis; 3015 cAgent.AtAxis = CameraAtAxis;
3016 cAgent.LeftAxis = CameraLeftAxis; 3016 cAgent.LeftAxis = CameraLeftAxis;
3017 cAgent.UpAxis = CameraUpAxis; 3017 cAgent.UpAxis = CameraUpAxis;
3018 3018
3019 cAgent.Far = DrawDistance; 3019 cAgent.Far = DrawDistance;
@@ -3099,7 +3099,7 @@ namespace OpenSim.Region.Framework.Scenes
3099 m_velocity = cAgent.Velocity; 3099 m_velocity = cAgent.Velocity;
3100 CameraPosition = cAgent.Center; 3100 CameraPosition = cAgent.Center;
3101 CameraAtAxis = cAgent.AtAxis; 3101 CameraAtAxis = cAgent.AtAxis;
3102 CameraLeftAxis = cAgent.LeftAxis; 3102 CameraLeftAxis = cAgent.LeftAxis;
3103 CameraUpAxis = cAgent.UpAxis; 3103 CameraUpAxis = cAgent.UpAxis;
3104 3104
3105 // When we get to the point of re-computing neighbors everytime this 3105 // When we get to the point of re-computing neighbors everytime this
diff --git a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
index e4b607d..e16903c 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs
@@ -65,8 +65,7 @@ namespace OpenSim.Region.Framework.Tests
65 65
66 // Create an object embedded inside the first 66 // Create an object embedded inside the first
67 UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000"); 67 UUID taskSceneObjectItemId = UUID.Parse("00000000-0000-0000-0000-100000000000");
68 TaskInventoryItem taskSceneObjectItem 68 TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID);
69 = TaskInventoryHelpers.AddSceneObject(scene, sop1, "tso", taskSceneObjectItemId, user1.PrincipalID);
70 69
71 TaskInventoryItem addedItem = sop1.Inventory.GetInventoryItem(taskSceneObjectItemId); 70 TaskInventoryItem addedItem = sop1.Inventory.GetInventoryItem(taskSceneObjectItemId);
72 Assert.That(addedItem.ItemID, Is.EqualTo(taskSceneObjectItemId)); 71 Assert.That(addedItem.ItemID, Is.EqualTo(taskSceneObjectItemId));