aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs11
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs9
2 files changed, 19 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index f5cc680..f47e4d7 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -550,6 +550,17 @@ namespace OpenSim.Region.Environment.Scenes
550 // Ignore, and skip over. 550 // Ignore, and skip over.
551 //} 551 //}
552 //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString()); 552 //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString());
553
554 if (_parentID != 0)
555 {
556 Vector3 resultingposition = GetWorldPosition();
557 PhysActor.Position = new PhysicsVector(resultingposition.X, resultingposition.Y, resultingposition.Z);
558 Quaternion resultingrot = GetWorldRotation();
559 PhysActor.Orientation = resultingrot;
560
561 // Tell the physics engines that this prim changed.
562 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
563 }
553 } 564 }
554 } 565 }
555 566
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 6bda61e..447a4fb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1724,11 +1724,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1724 { 1724 {
1725 part.UpdateOffSet(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); 1725 part.UpdateOffSet(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
1726 } 1726 }
1727 else 1727 else if (part.ParentGroup.RootPart == part)
1728 { 1728 {
1729 SceneObjectGroup parent = part.ParentGroup; 1729 SceneObjectGroup parent = part.ParentGroup;
1730 parent.UpdateGroupPosition(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); 1730 parent.UpdateGroupPosition(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
1731 } 1731 }
1732 else
1733 {
1734 part.OffsetPosition = new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z);
1735 SceneObjectGroup parent = part.ParentGroup;
1736 parent.HasGroupChanged = true;
1737 parent.ScheduleGroupForTerseUpdate();
1738 }
1732 } 1739 }
1733 1740
1734 public LSL_Vector llGetPos() 1741 public LSL_Vector llGetPos()