minor: Make SOP.UpdateOffset() more consistent by checking against the same old OffsetPosition rather than one which may vary if it simultaneously changes.
parent
86bdc4eca4
commit
a49447832e
|
@ -3808,17 +3808,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// Update this part's offset position.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pos"></param>
|
/// <param name="pos"></param>
|
||||||
public void UpdateOffSet(Vector3 pos)
|
public void UpdateOffSet(Vector3 newPos)
|
||||||
{
|
{
|
||||||
if ((pos.X != OffsetPosition.X) ||
|
Vector3 oldPos = OffsetPosition;
|
||||||
(pos.Y != OffsetPosition.Y) ||
|
|
||||||
(pos.Z != OffsetPosition.Z))
|
|
||||||
{
|
|
||||||
Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z);
|
|
||||||
|
|
||||||
|
if ((newPos.X != oldPos.X) ||
|
||||||
|
(newPos.Y != oldPos.Y) ||
|
||||||
|
(newPos.Z != oldPos.Z))
|
||||||
|
{
|
||||||
if (ParentGroup.RootPart.GetStatusSandbox())
|
if (ParentGroup.RootPart.GetStatusSandbox())
|
||||||
{
|
{
|
||||||
if (Util.GetDistanceTo(ParentGroup.RootPart.StatusSandboxPos, newPos) > 10)
|
if (Util.GetDistanceTo(ParentGroup.RootPart.StatusSandboxPos, newPos) > 10)
|
||||||
|
|
Loading…
Reference in New Issue