From 3332af4060960a4b649d3d5237988e0f410b54e3 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 3 Apr 2013 00:01:06 +0100
Subject: minor: Make SOP.UpdateOffset() more consistent by checking against
the same old OffsetPosition rather than one which may vary if it
simultaneously changes.
---
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes')
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
}
///
- ///
+ /// 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)
--
cgit v1.1