aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorKitto Flora2009-12-19 19:54:44 -0500
committerKitto Flora2009-12-19 19:54:44 -0500
commite38e8ae98759e403175016260edd27772b5c9e4c (patch)
treed766b91ca276c7e824e1cfd274e4dfe9c435ad6f /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentFix prim linking bug, Manis #14 (diff)
downloadopensim-SC_OLD-e38e8ae98759e403175016260edd27772b5c9e4c.zip
opensim-SC_OLD-e38e8ae98759e403175016260edd27772b5c9e4c.tar.gz
opensim-SC_OLD-e38e8ae98759e403175016260edd27772b5c9e4c.tar.bz2
opensim-SC_OLD-e38e8ae98759e403175016260edd27772b5c9e4c.tar.xz
Fix mantis #10 & #14
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs33
1 files changed, 10 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 778e384..0eddbfd 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -513,24 +513,11 @@ namespace OpenSim.Region.Framework.Scenes
513 { 513 {
514 // If this is a linkset, we don't want the physics engine mucking up our group position here. 514 // If this is a linkset, we don't want the physics engine mucking up our group position here.
515 PhysicsActor actor = PhysActor; 515 PhysicsActor actor = PhysActor;
516
517 if (actor != null && _parentID == 0) 516 if (actor != null && _parentID == 0)
518 { 517 {
519 m_groupPosition = actor.Position; 518 m_groupPosition = actor.Position;
520 }
521/*
522 if (actor != null)
523 {
524 if (_parentID == 0)
525 {
526 m_groupPosition = actor.Position;
527 }
528 else
529 {
530 m_groupPosition = ParentGroup.AbsolutePosition; // KF+Casper Update Child prims too!
531 }
532 } 519 }
533*/ 520
534 if (IsAttachment) 521 if (IsAttachment)
535 { 522 {
536 ScenePresence sp = m_parentGroup.Scene.GetScenePresence(AttachedAvatar); 523 ScenePresence sp = m_parentGroup.Scene.GetScenePresence(AttachedAvatar);
@@ -545,7 +532,6 @@ namespace OpenSim.Region.Framework.Scenes
545 StoreUndoState(); 532 StoreUndoState();
546 533
547 m_groupPosition = value; 534 m_groupPosition = value;
548
549 PhysicsActor actor = PhysActor; 535 PhysicsActor actor = PhysActor;
550 if (actor != null) 536 if (actor != null)
551 { 537 {
@@ -1755,16 +1741,17 @@ namespace OpenSim.Region.Framework.Scenes
1755 public Vector3 GetWorldPosition() 1741 public Vector3 GetWorldPosition()
1756 { 1742 {
1757 Quaternion parentRot = ParentGroup.RootPart.RotationOffset; 1743 Quaternion parentRot = ParentGroup.RootPart.RotationOffset;
1758
1759 Vector3 axPos = OffsetPosition; 1744 Vector3 axPos = OffsetPosition;
1760 axPos *= parentRot; 1745 axPos *= parentRot;
1761 Vector3 translationOffsetPosition = axPos; 1746 Vector3 translationOffsetPosition = axPos;
1762 1747 if(_parentID == 0)
1763 int tx = (int)GroupPosition.X; 1748 {
1764 int ty = (int)GroupPosition.Y; 1749 return GroupPosition;
1765 int tz = (int)GroupPosition.Z; 1750 }
1766 1751 else
1767 return GroupPosition + translationOffsetPosition; 1752 {
1753 return ParentGroup.AbsolutePosition + translationOffsetPosition; //KF: Fix child prim position
1754 }
1768 } 1755 }
1769 1756
1770 /// <summary> 1757 /// <summary>
@@ -1775,7 +1762,7 @@ namespace OpenSim.Region.Framework.Scenes
1775 { 1762 {
1776 Quaternion newRot; 1763 Quaternion newRot;
1777 1764
1778 if (this.LinkNum == 0) 1765 if (this.LinkNum < 2) //KF Single or root prim
1779 { 1766 {
1780 newRot = RotationOffset; 1767 newRot = RotationOffset;
1781 } 1768 }