minor: Make SOP.UpdateOffset() more consistent by checking against the same old OffsetPosition rather than one which may vary if it simultaneously changes.

user_profiles
Justin Clark-Casey (justincc) 2013-04-03 00:01:06 +01:00
parent a3c723ee30
commit 3332af4060
1 changed files with 7 additions and 7 deletions

View File

@ -3915,17 +3915,17 @@ namespace OpenSim.Region.Framework.Scenes
}
/// <summary>
///
/// Update this part's offset position.
/// </summary>
/// <param name="pos"></param>
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)