aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs10
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs19
2 files changed, 24 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 20624d5..87a42b1 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -547,7 +547,7 @@ namespace OpenSim.Region.Environment.Scenes
547 SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape); 547 SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape);
548 AddEntity(sceneOb); 548 AddEntity(sceneOb);
549 SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID); 549 SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID);
550 // rootPart.PhysActor =phyScene.AddPrim(new PhysicsVector(pos.X, pos.Y, pos.Z), new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z), 550 //rootPart.PhysActor =phyScene.AddPrim(new PhysicsVector(pos.X, pos.Y, pos.Z), new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z),
551 // new Axiom.Math.Quaternion()); 551 // new Axiom.Math.Quaternion());
552 } 552 }
553 553
@@ -626,11 +626,11 @@ namespace OpenSim.Region.Environment.Scenes
626 AddEntity(obj); 626 AddEntity(obj);
627 627
628 SceneObjectPart rootPart = obj.GetChildPart(obj.UUID); 628 SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
629 //rootPart.PhysActor = phyScene.AddPrim( 629 //rootPart.PhysActor = phyScene.AddPrim(
630 // new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z), 630 // new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z),
631 // new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z), 631 // new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
632 // new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X, 632 // new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
633 // rootPart.RotationOffset.Y, rootPart.RotationOffset.Z)); 633 // rootPart.RotationOffset.Y, rootPart.RotationOffset.Z));
634 primCount++; 634 primCount++;
635 } 635 }
636 } 636 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 7e34637..f787190 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -717,6 +717,13 @@ namespace OpenSim.Region.Environment.Scenes
717 if (part != null) 717 if (part != null)
718 { 718 {
719 part.Resize(scale); 719 part.Resize(scale);
720 if (part.UUID == this.m_rootPart.UUID)
721 {
722 if (m_rootPart.PhysActor != null)
723 {
724 m_rootPart.PhysActor.Size = new PhysicsVector(m_rootPart.Scale.X, m_rootPart.Scale.Y, m_rootPart.Scale.Z);
725 }
726 }
720 } 727 }
721 } 728 }
722 #endregion 729 #endregion
@@ -789,6 +796,10 @@ namespace OpenSim.Region.Environment.Scenes
789 public void UpdateGroupRotation(LLQuaternion rot) 796 public void UpdateGroupRotation(LLQuaternion rot)
790 { 797 {
791 this.m_rootPart.UpdateRotation(rot); 798 this.m_rootPart.UpdateRotation(rot);
799 if (m_rootPart.PhysActor != null)
800 {
801 m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z);
802 }
792 this.ScheduleGroupForTerseUpdate(); 803 this.ScheduleGroupForTerseUpdate();
793 } 804 }
794 805
@@ -800,6 +811,10 @@ namespace OpenSim.Region.Environment.Scenes
800 public void UpdateGroupRotation(LLVector3 pos, LLQuaternion rot) 811 public void UpdateGroupRotation(LLVector3 pos, LLQuaternion rot)
801 { 812 {
802 this.m_rootPart.UpdateRotation(rot); 813 this.m_rootPart.UpdateRotation(rot);
814 if (m_rootPart.PhysActor != null)
815 {
816 m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z);
817 }
803 this.AbsolutePosition = pos; 818 this.AbsolutePosition = pos;
804 this.ScheduleGroupForTerseUpdate(); 819 this.ScheduleGroupForTerseUpdate();
805 } 820 }
@@ -832,6 +847,10 @@ namespace OpenSim.Region.Environment.Scenes
832 private void UpdateRootRotation(LLQuaternion rot) 847 private void UpdateRootRotation(LLQuaternion rot)
833 { 848 {
834 this.m_rootPart.UpdateRotation(rot); 849 this.m_rootPart.UpdateRotation(rot);
850 if (m_rootPart.PhysActor != null)
851 {
852 m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z);
853 }
835 Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z); 854 Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z);
836 Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z); 855 Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);
837 856