diff options
author | Melanie | 2012-03-03 09:58:57 +0000 |
---|---|---|
committer | Melanie | 2012-03-03 09:58:57 +0000 |
commit | 1f32730798c7633bbed47736a1b302dcd13ce903 (patch) | |
tree | 2456fc1135e91e56e0d17d9fbe67f147b7f5fda2 /OpenSim/Region/Framework | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Remove outdated comment about checking attachment prims in Scene.PipeEventsFo... (diff) | |
download | opensim-SC_OLD-1f32730798c7633bbed47736a1b302dcd13ce903.zip opensim-SC_OLD-1f32730798c7633bbed47736a1b302dcd13ce903.tar.gz opensim-SC_OLD-1f32730798c7633bbed47736a1b302dcd13ce903.tar.bz2 opensim-SC_OLD-1f32730798c7633bbed47736a1b302dcd13ce903.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Framework/Servers/VersionInfo.cs
OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
OpenSim/Region/Framework/Scenes/ScenePresence.cs
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 114 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/TaskInventoryTests.cs | 3 |
3 files changed, 28 insertions, 98 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 108f3c8..4324cc0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4330,16 +4330,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
4330 | public bool PipeEventsForScript(uint localID) | 4330 | public bool PipeEventsForScript(uint localID) |
4331 | { | 4331 | { |
4332 | SceneObjectPart part = GetSceneObjectPart(localID); | 4332 | SceneObjectPart part = GetSceneObjectPart(localID); |
4333 | |||
4333 | if (part != null) | 4334 | if (part != null) |
4334 | { | 4335 | { |
4335 | // Changed so that child prims of attachments return ScriptDanger for their parent, so that | ||
4336 | // their scripts will actually run. | ||
4337 | // -- Leaf, Tue Aug 12 14:17:05 EDT 2008 | ||
4338 | SceneObjectPart parent = part.ParentGroup.RootPart; | 4336 | SceneObjectPart parent = part.ParentGroup.RootPart; |
4339 | if (part.ParentGroup.IsAttachment) | 4337 | return ScriptDanger(parent, parent.GetWorldPosition()); |
4340 | return ScriptDanger(parent, parent.GetWorldPosition()); | ||
4341 | else | ||
4342 | return ScriptDanger(part, part.GetWorldPosition()); | ||
4343 | } | 4338 | } |
4344 | else | 4339 | else |
4345 | { | 4340 | { |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 26fa6c0..2efb0d2 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -349,13 +349,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
349 | /// </summary> | 349 | /// </summary> |
350 | protected Vector3 m_lastCameraPosition; | 350 | protected Vector3 m_lastCameraPosition; |
351 | 351 | ||
352 | protected Vector3 m_CameraPosition; | 352 | public Vector3 CameraPosition { get; set; } |
353 | |||
354 | public Vector3 CameraPosition | ||
355 | { | ||
356 | get { return m_CameraPosition; } | ||
357 | private set { m_CameraPosition = value; } | ||
358 | } | ||
359 | 353 | ||
360 | public Quaternion CameraRotation | 354 | public Quaternion CameraRotation |
361 | { | 355 | { |
@@ -365,28 +359,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
365 | // Use these three vectors to figure out what the agent is looking at | 359 | // Use these three vectors to figure out what the agent is looking at |
366 | // Convert it to a Matrix and/or Quaternion | 360 | // Convert it to a Matrix and/or Quaternion |
367 | // | 361 | // |
368 | protected Vector3 m_CameraAtAxis; | 362 | public Vector3 CameraAtAxis { get; set; } |
369 | protected Vector3 m_CameraLeftAxis; | 363 | public Vector3 CameraLeftAxis { get; set; } |
370 | protected Vector3 m_CameraUpAxis; | 364 | public Vector3 CameraUpAxis { get; set; } |
371 | |||
372 | public Vector3 CameraAtAxis | ||
373 | { | ||
374 | get { return m_CameraAtAxis; } | ||
375 | private set { m_CameraAtAxis = value; } | ||
376 | } | ||
377 | |||
378 | |||
379 | public Vector3 CameraLeftAxis | ||
380 | { | ||
381 | get { return m_CameraLeftAxis; } | ||
382 | private set { m_CameraLeftAxis = value; } | ||
383 | } | ||
384 | |||
385 | public Vector3 CameraUpAxis | ||
386 | { | ||
387 | get { return m_CameraUpAxis; } | ||
388 | private set { m_CameraUpAxis = value; } | ||
389 | } | ||
390 | 365 | ||
391 | public Vector3 Lookat | 366 | public Vector3 Lookat |
392 | { | 367 | { |
@@ -402,33 +377,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
402 | } | 377 | } |
403 | #endregion | 378 | #endregion |
404 | 379 | ||
405 | public readonly string Firstname; | 380 | public string Firstname { get; private set; } |
406 | public readonly string Lastname; | 381 | public string Lastname { get; private set; } |
407 | 382 | ||
408 | private string m_grouptitle; | 383 | public string Grouptitle { get; set; } |
409 | |||
410 | public string Grouptitle | ||
411 | { | ||
412 | get { return m_grouptitle; } | ||
413 | set { m_grouptitle = value; } | ||
414 | } | ||
415 | 384 | ||
416 | // Agent's Draw distance. | 385 | // Agent's Draw distance. |
417 | protected float m_DrawDistance; | 386 | public float DrawDistance { get; set; } |
418 | |||
419 | public float DrawDistance | ||
420 | { | ||
421 | get { return m_DrawDistance; } | ||
422 | private set { m_DrawDistance = value; } | ||
423 | } | ||
424 | |||
425 | protected bool m_allowMovement = true; | ||
426 | 387 | ||
427 | public bool AllowMovement | 388 | public bool AllowMovement { get; set; } |
428 | { | ||
429 | get { return m_allowMovement; } | ||
430 | set { m_allowMovement = value; } | ||
431 | } | ||
432 | 389 | ||
433 | private bool m_setAlwaysRun; | 390 | private bool m_setAlwaysRun; |
434 | 391 | ||
@@ -455,13 +412,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
455 | } | 412 | } |
456 | } | 413 | } |
457 | 414 | ||
458 | private byte m_state; | 415 | public byte State { get; set; } |
459 | |||
460 | public byte State | ||
461 | { | ||
462 | get { return m_state; } | ||
463 | set { m_state = value; } | ||
464 | } | ||
465 | 416 | ||
466 | private AgentManager.ControlFlags m_AgentControlFlags; | 417 | private AgentManager.ControlFlags m_AgentControlFlags; |
467 | 418 | ||
@@ -471,29 +422,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
471 | set { m_AgentControlFlags = (AgentManager.ControlFlags)value; } | 422 | set { m_AgentControlFlags = (AgentManager.ControlFlags)value; } |
472 | } | 423 | } |
473 | 424 | ||
474 | /// <summary> | 425 | public IClientAPI ControllingClient { get; set; } |
475 | /// This works out to be the ClientView object associated with this avatar, or it's client connection manager | ||
476 | /// </summary> | ||
477 | private IClientAPI m_controllingClient; | ||
478 | |||
479 | public IClientAPI ControllingClient | ||
480 | { | ||
481 | get { return m_controllingClient; } | ||
482 | private set { m_controllingClient = value; } | ||
483 | } | ||
484 | 426 | ||
485 | public IClientCore ClientView | 427 | public IClientCore ClientView |
486 | { | 428 | { |
487 | get { return (IClientCore) m_controllingClient; } | 429 | get { return (IClientCore)ControllingClient; } |
488 | } | 430 | } |
489 | 431 | ||
490 | protected Vector3 m_parentPosition; | 432 | public Vector3 ParentPosition { get; set; } |
491 | |||
492 | public Vector3 ParentPosition | ||
493 | { | ||
494 | get { return m_parentPosition; } | ||
495 | set { m_parentPosition = value; } | ||
496 | } | ||
497 | 433 | ||
498 | /// <summary> | 434 | /// <summary> |
499 | /// Position of this avatar relative to the region the avatar is in | 435 | /// Position of this avatar relative to the region the avatar is in |
@@ -760,7 +696,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
760 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) | 696 | IClientAPI client, Scene world, AvatarAppearance appearance, PresenceType type) |
761 | { | 697 | { |
762 | AttachmentsSyncLock = new Object(); | 698 | AttachmentsSyncLock = new Object(); |
763 | 699 | AllowMovement = true; | |
764 | IsChildAgent = true; | 700 | IsChildAgent = true; |
765 | m_sendCourseLocationsMethod = SendCoarseLocationsDefault; | 701 | m_sendCourseLocationsMethod = SendCoarseLocationsDefault; |
766 | Animator = new ScenePresenceAnimator(this); | 702 | Animator = new ScenePresenceAnimator(this); |
@@ -839,17 +775,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
839 | private Vector3[] GetWalkDirectionVectors() | 775 | private Vector3[] GetWalkDirectionVectors() |
840 | { | 776 | { |
841 | Vector3[] vector = new Vector3[11]; | 777 | Vector3[] vector = new Vector3[11]; |
842 | vector[0] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD | 778 | vector[0] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD |
843 | vector[1] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK | 779 | vector[1] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK |
844 | vector[2] = Vector3.UnitY; //LEFT | 780 | vector[2] = Vector3.UnitY; //LEFT |
845 | vector[3] = -Vector3.UnitY; //RIGHT | 781 | vector[3] = -Vector3.UnitY; //RIGHT |
846 | vector[4] = new Vector3(m_CameraAtAxis.Z, 0f, m_CameraUpAxis.Z); //UP | 782 | vector[4] = new Vector3(CameraAtAxis.Z, 0f, CameraUpAxis.Z); //UP |
847 | vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN | 783 | vector[5] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN |
848 | vector[6] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD_NUDGE | 784 | vector[6] = new Vector3(CameraUpAxis.Z, 0f, -CameraAtAxis.Z); //FORWARD_NUDGE |
849 | vector[7] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK_NUDGE | 785 | vector[7] = new Vector3(-CameraUpAxis.Z, 0f, CameraAtAxis.Z); //BACK_NUDGE |
850 | vector[8] = Vector3.UnitY; //LEFT_NUDGE | 786 | vector[8] = Vector3.UnitY; //LEFT_NUDGE |
851 | vector[9] = -Vector3.UnitY; //RIGHT_NUDGE | 787 | vector[9] = -Vector3.UnitY; //RIGHT_NUDGE |
852 | vector[10] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_NUDGE | 788 | vector[10] = new Vector3(-CameraAtAxis.Z, 0f, -CameraUpAxis.Z); //DOWN_NUDGE |
853 | return vector; | 789 | return vector; |
854 | } | 790 | } |
855 | 791 | ||
@@ -1380,7 +1316,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1380 | // Convert it to a Matrix and/or Quaternion | 1316 | // Convert it to a Matrix and/or Quaternion |
1381 | CameraAtAxis = agentData.CameraAtAxis; | 1317 | CameraAtAxis = agentData.CameraAtAxis; |
1382 | CameraLeftAxis = agentData.CameraLeftAxis; | 1318 | CameraLeftAxis = agentData.CameraLeftAxis; |
1383 | m_CameraUpAxis = agentData.CameraUpAxis; | 1319 | CameraUpAxis = agentData.CameraUpAxis; |
1384 | 1320 | ||
1385 | // The Agent's Draw distance setting | 1321 | // The Agent's Draw distance setting |
1386 | // When we get to the point of re-computing neighbors everytime this | 1322 | // When we get to the point of re-computing neighbors everytime this |
@@ -1392,7 +1328,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1392 | // Check if Client has camera in 'follow cam' or 'build' mode. | 1328 | // Check if Client has camera in 'follow cam' or 'build' mode. |
1393 | Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); | 1329 | Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); |
1394 | 1330 | ||
1395 | m_followCamAuto = ((m_CameraUpAxis.Z > 0.959f && m_CameraUpAxis.Z < 0.98f) | 1331 | m_followCamAuto = ((CameraUpAxis.Z > 0.959f && CameraUpAxis.Z < 0.98f) |
1396 | && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false; | 1332 | && (Math.Abs(camdif.X) < 0.4f && Math.Abs(camdif.Y) < 0.4f)) ? true : false; |
1397 | 1333 | ||
1398 | m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0; | 1334 | m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0; |
@@ -3158,7 +3094,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3158 | cAgent.Center = CameraPosition; | 3094 | cAgent.Center = CameraPosition; |
3159 | cAgent.AtAxis = CameraAtAxis; | 3095 | cAgent.AtAxis = CameraAtAxis; |
3160 | cAgent.LeftAxis = CameraLeftAxis; | 3096 | cAgent.LeftAxis = CameraLeftAxis; |
3161 | cAgent.UpAxis = m_CameraUpAxis; | 3097 | cAgent.UpAxis = CameraUpAxis; |
3162 | 3098 | ||
3163 | cAgent.Far = DrawDistance; | 3099 | cAgent.Far = DrawDistance; |
3164 | 3100 | ||
@@ -3247,7 +3183,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3247 | CameraPosition = cAgent.Center; | 3183 | CameraPosition = cAgent.Center; |
3248 | CameraAtAxis = cAgent.AtAxis; | 3184 | CameraAtAxis = cAgent.AtAxis; |
3249 | CameraLeftAxis = cAgent.LeftAxis; | 3185 | CameraLeftAxis = cAgent.LeftAxis; |
3250 | m_CameraUpAxis = cAgent.UpAxis; | 3186 | CameraUpAxis = cAgent.UpAxis; |
3251 | ParentUUID = cAgent.ParentPart; | 3187 | ParentUUID = cAgent.ParentPart; |
3252 | m_prevSitOffset = cAgent.SitOffset; | 3188 | m_prevSitOffset = cAgent.SitOffset; |
3253 | 3189 | ||
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)); |