diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 34c66d9558..b6fc707ef4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -3808,17 +3808,17 @@ namespace OpenSim.Region.Framework.Scenes } /// - /// + /// Update this part's offset position. /// /// - public void UpdateOffSet(Vector3 pos) + public void UpdateOffSet(Vector3 newPos) { - if ((pos.X != OffsetPosition.X) || - (pos.Y != OffsetPosition.Y) || - (pos.Z != OffsetPosition.Z)) - { - Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z); + Vector3 oldPos = OffsetPosition; + if ((newPos.X != oldPos.X) || + (newPos.Y != oldPos.Y) || + (newPos.Z != oldPos.Z)) + { if (ParentGroup.RootPart.GetStatusSandbox()) { if (Util.GetDistanceTo(ParentGroup.RootPart.StatusSandboxPos, newPos) > 10)