aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-04-03 00:01:06 +0100
committerJustin Clark-Casey (justincc)2013-04-03 00:01:06 +0100
commit3332af4060960a4b649d3d5237988e0f410b54e3 (patch)
treec90cf1148c29937169f7f1cbebce5164d2034f8b
parentFix minor race condition where SOP.GetGeometricCenter() and GetCenterOfMass()... (diff)
downloadopensim-SC_OLD-3332af4060960a4b649d3d5237988e0f410b54e3.zip
opensim-SC_OLD-3332af4060960a4b649d3d5237988e0f410b54e3.tar.gz
opensim-SC_OLD-3332af4060960a4b649d3d5237988e0f410b54e3.tar.bz2
opensim-SC_OLD-3332af4060960a4b649d3d5237988e0f410b54e3.tar.xz
minor: Make SOP.UpdateOffset() more consistent by checking against the same old OffsetPosition rather than one which may vary if it simultaneously changes.
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 2fcb199..d412702 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3915,17 +3915,17 @@ namespace OpenSim.Region.Framework.Scenes
3915 } 3915 }
3916 3916
3917 /// <summary> 3917 /// <summary>
3918 /// 3918 /// Update this part's offset position.
3919 /// </summary> 3919 /// </summary>
3920 /// <param name="pos"></param> 3920 /// <param name="pos"></param>
3921 public void UpdateOffSet(Vector3 pos) 3921 public void UpdateOffSet(Vector3 newPos)
3922 { 3922 {
3923 if ((pos.X != OffsetPosition.X) || 3923 Vector3 oldPos = OffsetPosition;
3924 (pos.Y != OffsetPosition.Y) ||
3925 (pos.Z != OffsetPosition.Z))
3926 {
3927 Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z);
3928 3924
3925 if ((newPos.X != oldPos.X) ||
3926 (newPos.Y != oldPos.Y) ||
3927 (newPos.Z != oldPos.Z))
3928 {
3929 if (ParentGroup.RootPart.GetStatusSandbox()) 3929 if (ParentGroup.RootPart.GetStatusSandbox())
3930 { 3930 {
3931 if (Util.GetDistanceTo(ParentGroup.RootPart.StatusSandboxPos, newPos) > 10) 3931 if (Util.GetDistanceTo(ParentGroup.RootPart.StatusSandboxPos, newPos) > 10)